main
陈志嘉 1 week ago
parent b0352e4c5f
commit d864ed501a

@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log* pnpm-debug.log*
lerna-debug.log* lerna-debug.log*
node_modules
dist dist
dist-ssr dist-ssr
*.local *.local

@ -6,15 +6,16 @@
"flags": [], "flags": [],
"linkedModules": [], "linkedModules": [],
"topLevelPatterns": [ "topLevelPatterns": [
"@vitejs/plugin-vue@^5.1.2", "@vitejs/plugin-vue@^5.1.4",
"vite@^5.4.1", "vite@^5.4.10",
"vue@^3.4.37" "vue-router@4",
"vue@^3.5.12"
], ],
"lockfileEntries": { "lockfileEntries": {
"@babel/helper-string-parser@^7.24.8": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d", "@babel/helper-string-parser@^7.25.9": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c",
"@babel/helper-validator-identifier@^7.24.7": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db", "@babel/helper-validator-identifier@^7.25.9": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7",
"@babel/parser@^7.24.7": "https://registry.npmmirror.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a", "@babel/parser@^7.25.3": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11",
"@babel/types@^7.25.4": "https://registry.npmmirror.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f", "@babel/types@^7.26.0": "https://registry.npmmirror.com/@babel/types/-/types-7.26.0.tgz#deabd08d6b753bc8e0f198f8709fb575e31774ff",
"@esbuild/aix-ppc64@0.21.5": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f", "@esbuild/aix-ppc64@0.21.5": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f",
"@esbuild/android-arm64@0.21.5": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052", "@esbuild/android-arm64@0.21.5": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052",
"@esbuild/android-arm@0.21.5": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28", "@esbuild/android-arm@0.21.5": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28",
@ -39,49 +40,53 @@
"@esbuild/win32-ia32@0.21.5": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b", "@esbuild/win32-ia32@0.21.5": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b",
"@esbuild/win32-x64@0.21.5": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c", "@esbuild/win32-x64@0.21.5": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c",
"@jridgewell/sourcemap-codec@^1.5.0": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a", "@jridgewell/sourcemap-codec@^1.5.0": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a",
"@rollup/rollup-android-arm-eabi@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.1.tgz#c3a7938551273a2b72820cf5d22e54cf41dc206e", "@rollup/rollup-android-arm-eabi@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.26.0.tgz#f221c519a6efb5d3652bff32351522e0fb98e392",
"@rollup/rollup-android-arm64@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.1.tgz#fa3693e4674027702c42fcbbb86bbd0c635fd3b9", "@rollup/rollup-android-arm64@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.26.0.tgz#196a2379d81011422fe1128e512a8811605ede16",
"@rollup/rollup-darwin-arm64@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.1.tgz#e19922f4ac1e4552a230ff8f49d5688c5c07d284", "@rollup/rollup-darwin-arm64@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.26.0.tgz#0c83e5f25adae7f0543ac29a0ebd485a0e7cd3e4",
"@rollup/rollup-darwin-x64@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.1.tgz#897f8d47b115ea84692a29cf2366899499d4d915", "@rollup/rollup-darwin-x64@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.26.0.tgz#8131b174ca8cec04e2041e42eb8382afe31095c8",
"@rollup/rollup-linux-arm-gnueabihf@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.1.tgz#7d1e2a542f3a5744f5c24320067bd5af99ec9d62", "@rollup/rollup-freebsd-arm64@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.26.0.tgz#550a0ebf5bea6ceee79dc2f75a0bcef7d660de2c",
"@rollup/rollup-linux-arm-musleabihf@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.1.tgz#88bec1c9df85fc5e24d49f783e19934717dd69b5", "@rollup/rollup-freebsd-x64@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.26.0.tgz#51ca2e6d9ce72e63d5201607651732e5300a6f81",
"@rollup/rollup-linux-arm64-gnu@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.1.tgz#6dc60f0fe7bd49ed07a2d4d9eab15e671b3bd59d", "@rollup/rollup-linux-arm-gnueabihf@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.26.0.tgz#ae71d6aa81e702c4efb72c1a67a6a4e790267a1b",
"@rollup/rollup-linux-arm64-musl@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.1.tgz#a03b78775c129e8333aca9e1e420e8e217ee99b9", "@rollup/rollup-linux-arm-musleabihf@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.26.0.tgz#6aa7baa5c39c095fa5f9804e283e126697e0342a",
"@rollup/rollup-linux-powerpc64le-gnu@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.1.tgz#ee3810647faf2c105a5a4e71260bb90b96bf87bc", "@rollup/rollup-linux-arm64-gnu@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.26.0.tgz#2b06e147ca68c7729ca38e5c7a514d1b00f4d151",
"@rollup/rollup-linux-riscv64-gnu@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.1.tgz#385d76a088c27db8054d9f3f28d64d89294f838e", "@rollup/rollup-linux-arm64-musl@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.26.0.tgz#70f8cacb255800e4cad41bdbe447432354288909",
"@rollup/rollup-linux-s390x-gnu@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.1.tgz#daa2b62a6e6f737ebef6700a12a93c9764e18583", "@rollup/rollup-linux-powerpc64le-gnu@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.26.0.tgz#21aed3ef42518b7fe33f4037a14b0939a071cf75",
"@rollup/rollup-linux-x64-gnu@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.1.tgz#790ae96118cc892464e9f10da358c0c8a6b9acdd", "@rollup/rollup-linux-riscv64-gnu@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.26.0.tgz#fe27eb8cbd3a6e0706459781c2463b624f785696",
"@rollup/rollup-linux-x64-musl@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.1.tgz#d613147f7ac15fafe2a0b6249e8484e161ca2847", "@rollup/rollup-linux-s390x-gnu@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.26.0.tgz#80289a528dd333b0e277efd93bfa8e2cdd27e5eb",
"@rollup/rollup-win32-arm64-msvc@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.1.tgz#18349db8250559a5460d59eb3575f9781be4ab98", "@rollup/rollup-linux-x64-gnu@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.26.0.tgz#9909570be5cb738c23858c94308d37dde363eb7e",
"@rollup/rollup-win32-ia32-msvc@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.1.tgz#199648b68271f7ab9d023f5c077725d51d12d466", "@rollup/rollup-linux-x64-musl@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.26.0.tgz#371315e032497f7a46f64b4ebcd207313b7f6669",
"@rollup/rollup-win32-x64-msvc@4.21.1": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.1.tgz#4d3ec02dbf280c20bfeac7e50cd5669b66f9108f", "@rollup/rollup-win32-arm64-msvc@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.26.0.tgz#f4b4e0747710ba287eb2e2a011538ee2ed7f74d3",
"@types/estree@1.0.5": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4", "@rollup/rollup-win32-ia32-msvc@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.26.0.tgz#2eeabbc99342dafe04613a76c441be4ebcca49c3",
"@vitejs/plugin-vue@^5.1.2": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz#f11091e0130eca6c1ca8cfb85ee71ea53b255d31", "@rollup/rollup-win32-x64-msvc@4.26.0": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.26.0.tgz#a3ae3da434a4ba0785312e963ae4c1239470403a",
"@vue/compiler-core@3.4.38": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.38.tgz#326dfe3c92fa2b0f1dc9b39a948a231980253496", "@types/estree@1.0.6": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50",
"@vue/compiler-dom@3.4.38": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.38.tgz#90348fac1130e0bbd408b650635cb626b3b9df06", "@vitejs/plugin-vue@^5.1.4": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.0.tgz#994f3b4f12d3590c5a6895df4cbd270d9a6d5e17",
"@vue/compiler-sfc@3.4.38": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.38.tgz#954c3f6777bbbcca28771ba59b795f12f76ef188", "@vue/compiler-core@3.5.12": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.12.tgz#bd70b7dabd12b0b6f31bc53418ba3da77994c437",
"@vue/compiler-ssr@3.4.38": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.38.tgz#9ded18f6d9c8b2440039a58492cfff36fa1a7774", "@vue/compiler-dom@3.5.12": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.12.tgz#456d631d11102535b7ee6fd954cf2c93158d0354",
"@vue/reactivity@3.4.38": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.38.tgz#ec2d549f4b831cd03d0baabf7d77e840b8536000", "@vue/compiler-sfc@3.5.12": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.12.tgz#6688120d905fcf22f7e44d3cb90f8dabc4dd3cc8",
"@vue/runtime-core@3.4.38": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.38.tgz#bead9085e9a1c5a446e27d74ffb450f9261cf097", "@vue/compiler-ssr@3.5.12": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.12.tgz#5f1a3fbd5c44b79a6dbe88729f7801d9c9218bde",
"@vue/runtime-dom@3.4.38": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.38.tgz#52678ba0b85f94400a0a9c8dd23ddef4dd65657d", "@vue/devtools-api@^6.6.4": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz#cbe97fe0162b365edc1dba80e173f90492535343",
"@vue/server-renderer@3.4.38": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.38.tgz#457401ef2b0f969156702061e56915acecc9fe2c", "@vue/reactivity@3.5.12": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.12.tgz#a2815d91842ed7b9e7e7936c851923caf6b6e603",
"@vue/shared@3.4.38": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.38.tgz#552a6770098bfd556fa3e2c686c9d3b4f4cd94c2", "@vue/runtime-core@3.5.12": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.12.tgz#849207f203d0fd82971f19574d30dbe7134c78c7",
"@vue/runtime-dom@3.5.12": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.12.tgz#6d4de3df49a90a460b311b1100baa5e2d0d1c8c9",
"@vue/server-renderer@3.5.12": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.12.tgz#79c6bc3860e4e4ef80d85653c5d03fd94b26574e",
"@vue/shared@3.5.12": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz#f9e45b7f63f2c3f40d84237b1194b7f67de192e3",
"csstype@^3.1.3": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81", "csstype@^3.1.3": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81",
"entities@^4.5.0": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48", "entities@^4.5.0": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48",
"esbuild@^0.21.3": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d", "esbuild@^0.21.3": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d",
"estree-walker@^2.0.2": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac", "estree-walker@^2.0.2": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac",
"fsevents@~2.3.2": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6", "fsevents@~2.3.2": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6",
"fsevents@~2.3.3": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6", "fsevents@~2.3.3": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6",
"magic-string@^0.30.10": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954", "magic-string@^0.30.11": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.12.tgz#9eb11c9d072b9bcb4940a5b2c2e1a217e4ee1a60",
"nanoid@^3.3.7": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8", "nanoid@^3.3.7": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8",
"picocolors@^1.0.1": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1", "picocolors@^1.1.1": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b",
"postcss@^8.4.40": "https://registry.npmmirror.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681", "postcss@^8.4.43": "https://registry.npmmirror.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19",
"postcss@^8.4.41": "https://registry.npmmirror.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681", "postcss@^8.4.47": "https://registry.npmmirror.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19",
"rollup@^4.20.0": "https://registry.npmmirror.com/rollup/-/rollup-4.21.1.tgz#65b9b9e9de9a64604fab083fb127f3e9eac2935d", "rollup@^4.20.0": "https://registry.npmmirror.com/rollup/-/rollup-4.26.0.tgz#a3e5fb29d50953633a2fd4506da6448d93268944",
"source-map-js@^1.2.0": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af", "source-map-js@^1.2.0": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46",
"to-fast-properties@^2.0.0": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e", "source-map-js@^1.2.1": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46",
"vite@^5.4.1": "https://registry.npmmirror.com/vite/-/vite-5.4.2.tgz#8acb6ec4bfab823cdfc1cb2d6c53ed311bc4e47e", "vite@^5.4.10": "https://registry.npmmirror.com/vite/-/vite-5.4.11.tgz#3b415cd4aed781a356c1de5a9ebafb837715f6e5",
"vue@^3.4.37": "https://registry.npmmirror.com/vue/-/vue-3.4.38.tgz#0ccbb64ed03ef3c4ab73e540793290b18e7c4236" "vue-router@4": "https://registry.npmmirror.com/vue-router/-/vue-router-4.4.5.tgz#bdf535e4cf32414ebdea6b4b403593efdb541388",
"vue@^3.5.12": "https://registry.npmmirror.com/vue/-/vue-3.5.12.tgz#e08421c601b3617ea2c9ef0413afcc747130b36c"
}, },
"files": [], "files": [],
"artifacts": {} "artifacts": {}

@ -1,6 +1,6 @@
{ {
"name": "@babel/helper-string-parser", "name": "@babel/helper-string-parser",
"version": "7.24.8", "version": "7.25.9",
"description": "A utility package to parse strings", "description": "A utility package to parse strings",
"repository": { "repository": {
"type": "git", "type": "git",

@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
exports.isIdentifierChar = isIdentifierChar; exports.isIdentifierChar = isIdentifierChar;
exports.isIdentifierName = isIdentifierName; exports.isIdentifierName = isIdentifierName;
exports.isIdentifierStart = isIdentifierStart; exports.isIdentifierStart = isIdentifierStart;
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
function isInAstralSet(code, set) { function isInAstralSet(code, set) {
let pos = 0x10000; let pos = 0x10000;
for (let i = 0, length = set.length; i < length; i += 2) { for (let i = 0, length = set.length; i < length; i += 2) {

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{ {
"name": "@babel/helper-validator-identifier", "name": "@babel/helper-validator-identifier",
"version": "7.24.7", "version": "7.25.9",
"description": "Validate identifier/keywords name", "description": "Validate identifier/keywords name",
"repository": { "repository": {
"type": "git", "type": "git",
@ -20,7 +20,7 @@
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"devDependencies": { "devDependencies": {
"@unicode/unicode-15.1.0": "^1.5.2", "@unicode/unicode-16.0.0": "^1.0.0",
"charcodes": "^0.2.0" "charcodes": "^0.2.0"
}, },
"engines": { "engines": {

@ -1,73 +0,0 @@
"use strict";
// Always use the latest available version of Unicode!
// https://tc39.github.io/ecma262/#sec-conformance
const version = "15.1.0";
const start = require(
"@unicode/unicode-" + version + "/Binary_Property/ID_Start/code-points.js"
).filter(function (ch) {
return ch > 0x7f;
});
let last = -1;
const cont = require(
"@unicode/unicode-" + version + "/Binary_Property/ID_Continue/code-points.js"
).filter(function (ch) {
return ch > 0x7f && search(start, ch, last + 1) === -1;
});
function search(arr, ch, starting) {
for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
if (arr[i] === ch) return i;
}
return -1;
}
function pad(str, width) {
while (str.length < width) str = "0" + str;
return str;
}
function esc(code) {
const hex = code.toString(16);
if (hex.length <= 2) return "\\x" + pad(hex, 2);
else return "\\u" + pad(hex, 4);
}
function generate(chars) {
const astral = [];
let re = "";
for (let i = 0, at = 0x10000; i < chars.length; i++) {
const from = chars[i];
let to = from;
while (i < chars.length - 1 && chars[i + 1] === to + 1) {
i++;
to++;
}
if (to <= 0xffff) {
if (from === to) re += esc(from);
else if (from + 1 === to) re += esc(from) + esc(to);
else re += esc(from) + "-" + esc(to);
} else {
astral.push(from - at, to - from);
at = to;
}
}
return { nonASCII: re, astral: astral };
}
const startData = generate(start);
const contData = generate(cont);
console.log("/* prettier-ignore */");
console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
console.log("/* prettier-ignore */");
console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
console.log("/* prettier-ignore */");
console.log(
"const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
);
console.log("/* prettier-ignore */");
console.log(
"const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{ {
"name": "@babel/parser", "name": "@babel/parser",
"version": "7.25.4", "version": "7.26.2",
"description": "A JavaScript parser", "description": "A JavaScript parser",
"author": "The Babel Team (https://babel.dev/team)", "author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-parser", "homepage": "https://babel.dev/docs/en/next/babel-parser",
@ -35,14 +35,14 @@
}, },
"# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.", "# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
"dependencies": { "dependencies": {
"@babel/types": "^7.25.4" "@babel/types": "^7.26.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/code-frame": "^7.24.7", "@babel/code-frame": "^7.26.2",
"@babel/helper-check-duplicate-nodes": "^7.24.7", "@babel/helper-check-duplicate-nodes": "^7.25.9",
"@babel/helper-fixtures": "^7.24.8", "@babel/helper-fixtures": "^7.26.0",
"@babel/helper-string-parser": "^7.24.8", "@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.24.7", "@babel/helper-validator-identifier": "^7.25.9",
"charcodes": "^0.2.0" "charcodes": "^0.2.0"
}, },
"bin": "./bin/babel-parser.js", "bin": "./bin/babel-parser.js",

@ -1,5 +1,5 @@
// This file is auto-generated! Do not modify it directly. // This file is auto-generated! Do not modify it directly.
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents, prettier/prettier */ /* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
import * as _babel_types from '@babel/types'; import * as _babel_types from '@babel/types';
type BABEL_8_BREAKING = false; type BABEL_8_BREAKING = false;
@ -13,11 +13,12 @@ type Plugin =
| IF_BABEL_7<"classPrivateProperties"> | IF_BABEL_7<"classPrivateProperties">
| IF_BABEL_7<"classProperties"> | IF_BABEL_7<"classProperties">
| IF_BABEL_7<"classStaticBlock"> | IF_BABEL_7<"classStaticBlock">
| "decimal" | IF_BABEL_7<"decimal">
| "decorators-legacy" | "decorators-legacy"
| "deferredImportEvaluation" | "deferredImportEvaluation"
| "decoratorAutoAccessors" | "decoratorAutoAccessors"
| "destructuringPrivate" | "destructuringPrivate"
| "deprecatedImportAssert"
| "doExpressions" | "doExpressions"
| IF_BABEL_7<"dynamicImport"> | IF_BABEL_7<"dynamicImport">
| "explicitResourceManagement" | "explicitResourceManagement"
@ -29,10 +30,10 @@ type Plugin =
| "functionSent" | "functionSent"
| "importMeta" | "importMeta"
| "jsx" | "jsx"
| IF_BABEL_7<"jsonStrings">
| IF_BABEL_7<"logicalAssignment"> | IF_BABEL_7<"logicalAssignment">
| "importAssertions" // deprecated | IF_BABEL_7<"importAssertions">
| "importAttributes" | IF_BABEL_7<"importReflection">
| "importReflection"
| "moduleBlocks" | "moduleBlocks"
| IF_BABEL_7<"moduleStringNames"> | IF_BABEL_7<"moduleStringNames">
| IF_BABEL_7<"nullishCoalescingOperator"> | IF_BABEL_7<"nullishCoalescingOperator">
@ -53,7 +54,7 @@ type Plugin =
type ParserPluginWithOptions = type ParserPluginWithOptions =
| ["decorators", DecoratorsPluginOptions] | ["decorators", DecoratorsPluginOptions]
| ["estree", { classFeatures?: boolean }] | ["estree", { classFeatures?: boolean }]
| ["importAttributes", { deprecatedAssertSyntax: boolean }] | IF_BABEL_7<["importAttributes", { deprecatedAssertSyntax: boolean }]>
| IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]> | IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]>
| ["optionalChainingAssign", { version: "2023-07" }] | ["optionalChainingAssign", { version: "2023-07" }]
| ["pipelineOperator", PipelineOperatorPluginOptions] | ["pipelineOperator", PipelineOperatorPluginOptions]
@ -69,7 +70,9 @@ interface DecoratorsPluginOptions {
} }
interface PipelineOperatorPluginOptions { interface PipelineOperatorPluginOptions {
proposal: "minimal" | "fsharp" | "hack" | "smart"; proposal: BABEL_8_BREAKING extends false
? "minimal" | "fsharp" | "hack" | "smart"
: "fsharp" | "hack";
topicToken?: "%" | "#" | "@@" | "^^" | "^"; topicToken?: "%" | "#" | "@@" | "^^" | "^";
} }
@ -77,10 +80,14 @@ interface RecordAndTuplePluginOptions {
syntaxType: "bar" | "hash"; syntaxType: "bar" | "hash";
} }
interface FlowPluginOptions { type FlowPluginOptions = BABEL_8_BREAKING extends true
? {
all?: boolean; all?: boolean;
enums?: boolean; enums?: boolean;
} }
: {
all?: boolean;
};
interface TypeScriptPluginOptions { interface TypeScriptPluginOptions {
dts?: boolean; dts?: boolean;
@ -182,6 +189,13 @@ interface ParserOptions {
*/ */
sourceFilename?: string; sourceFilename?: string;
/**
* By default, all source indexes start from 0.
* You can provide a start index to alternatively start with.
* Useful for integration with other source tools.
*/
startIndex?: number;
/** /**
* By default, the first line of code parsed is treated as line 1. * By default, the first line of code parsed is treated as line 1.
* You can provide a line number to alternatively start with. * You can provide a line number to alternatively start with.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -7,9 +7,13 @@ exports.default = validateNode;
var _validate = require("../validators/validate.js"); var _validate = require("../validators/validate.js");
var _index = require("../index.js"); var _index = require("../index.js");
function validateNode(node) { function validateNode(node) {
if (node == null || typeof node !== "object") return;
const fields = _index.NODE_FIELDS[node.type];
if (!fields) return;
const keys = _index.BUILDER_KEYS[node.type]; const keys = _index.BUILDER_KEYS[node.type];
for (const key of keys) { for (const key of keys) {
(0, _validate.default)(node, key, node[key]); const field = fields[key];
if (field != null) (0, _validate.validateInternal)(field, node, key, node[key]);
} }
return node; return node;
} }

@ -1 +1 @@
{"version":3,"names":["_validate","require","_index","validateNode","node","keys","BUILDER_KEYS","type","key","validate"],"sources":["../../src/builders/validateNode.ts"],"sourcesContent":["import validate from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS } from \"../index.ts\";\n\nexport default function validateNode<N extends t.Node>(node: N) {\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n validate(node, key, node[key]);\n }\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAAmBC,IAAO,EAAE;EAE9D,MAAMC,IAAI,GAAGC,mBAAY,CAACF,IAAI,CAACG,IAAI,CAAyB;EAC5D,KAAK,MAAMC,GAAG,IAAIH,IAAI,EAAE;IACtB,IAAAI,iBAAQ,EAACL,IAAI,EAAEI,GAAG,EAAEJ,IAAI,CAACI,GAAG,CAAC,CAAC;EAChC;EACA,OAAOJ,IAAI;AACb","ignoreList":[]} {"version":3,"names":["_validate","require","_index","validateNode","node","fields","NODE_FIELDS","type","keys","BUILDER_KEYS","key","field","validateInternal"],"sources":["../../src/builders/validateNode.ts"],"sourcesContent":["import { validateInternal } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS, NODE_FIELDS } from \"../index.ts\";\n\nexport default function validateNode<N extends t.Node>(node: N) {\n if (node == null || typeof node !== \"object\") return;\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n const field = fields[key];\n if (field != null) validateInternal(field, node, key, node[key]);\n }\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAAmBC,IAAO,EAAE;EAC9D,IAAIA,IAAI,IAAI,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;EAC9C,MAAMC,MAAM,GAAGC,kBAAW,CAACF,IAAI,CAACG,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAGb,MAAMG,IAAI,GAAGC,mBAAY,CAACL,IAAI,CAACG,IAAI,CAAyB;EAC5D,KAAK,MAAMG,GAAG,IAAIF,IAAI,EAAE;IACtB,MAAMG,KAAK,GAAGN,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIC,KAAK,IAAI,IAAI,EAAE,IAAAC,0BAAgB,EAACD,KAAK,EAAEP,IAAI,EAAEM,GAAG,EAAEN,IAAI,CAACM,GAAG,CAAC,CAAC;EAClE;EACA,OAAON,IAAI;AACb","ignoreList":[]}

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.patternLikeCommon = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0; exports.patternLikeCommon = exports.importAttributes = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0;
var _is = require("../validators/is.js"); var _is = require("../validators/is.js");
var _isValidIdentifier = require("../validators/isValidIdentifier.js"); var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
@ -14,7 +14,7 @@ const defineType = (0, _utils.defineAliasedType)("Standardized");
defineType("ArrayExpression", { defineType("ArrayExpression", {
fields: { fields: {
elements: { elements: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), validate: (0, _utils.arrayOf)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement")),
default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined
} }
}, },
@ -24,17 +24,16 @@ defineType("ArrayExpression", {
defineType("AssignmentExpression", { defineType("AssignmentExpression", {
fields: { fields: {
operator: { operator: {
validate: function () { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("string") : Object.assign(function () {
if (!process.env.BABEL_TYPES_8_BREAKING) {
return (0, _utils.assertValueType)("string");
}
const identifier = (0, _utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS); const identifier = (0, _utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS);
const pattern = (0, _utils.assertOneOf)("="); const pattern = (0, _utils.assertOneOf)("=");
return function (node, key, val) { return function (node, key, val) {
const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
validator(node, key, val); validator(node, key, val);
}; };
}() }(), {
type: "string"
})
}, },
left: { left: {
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal", "OptionalMemberExpression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "OptionalMemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal", "OptionalMemberExpression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "OptionalMemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
@ -102,12 +101,10 @@ defineType("BlockStatement", {
visitor: ["directives", "body"], visitor: ["directives", "body"],
fields: { fields: {
directives: { directives: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), validate: (0, _utils.arrayOfType)("Directive"),
default: [] default: []
}, },
body: { body: (0, _utils.validateArrayOfType)("Statement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
}
}, },
aliases: ["Scopable", "BlockParent", "Block", "Statement"] aliases: ["Scopable", "BlockParent", "Block", "Statement"]
}); });
@ -129,12 +126,10 @@ defineType("CallExpression", {
callee: { callee: {
validate: (0, _utils.assertNodeType)("Expression", "Super", "V8IntrinsicIdentifier") validate: (0, _utils.assertNodeType)("Expression", "Super", "V8IntrinsicIdentifier")
}, },
arguments: { arguments: (0, _utils.validateArrayOfType)("Expression", "SpreadElement", "ArgumentPlaceholder")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "ArgumentPlaceholder")))
}
}, !process.env.BABEL_TYPES_8_BREAKING ? { }, !process.env.BABEL_TYPES_8_BREAKING ? {
optional: { optional: {
validate: (0, _utils.assertOneOf)(true, false), validate: (0, _utils.assertValueType)("boolean"),
optional: true optional: true
} }
} : {}, { } : {}, {
@ -274,9 +269,7 @@ defineType("ForStatement", {
} }
}); });
const functionCommon = () => ({ const functionCommon = () => ({
params: { params: (0, _utils.validateArrayOfType)("Identifier", "Pattern", "RestElement"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
},
generator: { generator: {
default: false default: false
}, },
@ -320,8 +313,7 @@ defineType("FunctionDeclaration", {
} }
}), }),
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
validate: function () { validate: !process.env.BABEL_TYPES_8_BREAKING ? undefined : function () {
if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};
const identifier = (0, _utils.assertNodeType)("Identifier"); const identifier = (0, _utils.assertNodeType)("Identifier");
return function (parent, key, node) { return function (parent, key, node) {
if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
@ -357,7 +349,7 @@ const patternLikeCommon = () => ({
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
} }
}); });
@ -368,18 +360,16 @@ defineType("Identifier", {
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
fields: Object.assign({}, patternLikeCommon(), { fields: Object.assign({}, patternLikeCommon(), {
name: { name: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (!(0, _isValidIdentifier.default)(val, false)) { if (!(0, _isValidIdentifier.default)(val, false)) {
throw new TypeError(`"${val}" is not a valid identifier name`); throw new TypeError(`"${val}" is not a valid identifier name`);
} }
}, { }, {
type: "string" type: "string"
})) })) : (0, _utils.assertValueType)("string")
} }
}), }),
validate(parent, key, node) { validate: process.env.BABEL_TYPES_8_BREAKING ? function (parent, key, node) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
const match = /\.(\w+)$/.exec(key); const match = /\.(\w+)$/.exec(key);
if (!match) return; if (!match) return;
const [, parentKey] = match; const [, parentKey] = match;
@ -406,7 +396,7 @@ defineType("Identifier", {
if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") { if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
throw new TypeError(`"${node.name}" is not a valid identifier`); throw new TypeError(`"${node.name}" is not a valid identifier`);
} }
} } : undefined
}); });
defineType("IfStatement", { defineType("IfStatement", {
visitor: ["test", "consequent", "alternate"], visitor: ["test", "consequent", "alternate"],
@ -483,15 +473,14 @@ defineType("RegExpLiteral", {
validate: (0, _utils.assertValueType)("string") validate: (0, _utils.assertValueType)("string")
}, },
flags: { flags: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
const invalid = /[^gimsuy]/.exec(val); const invalid = /[^gimsuy]/.exec(val);
if (invalid) { if (invalid) {
throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`);
} }
}, { }, {
type: "string" type: "string"
})), })) : (0, _utils.assertValueType)("string"),
default: "" default: ""
} }
} }
@ -537,7 +526,7 @@ defineType("MemberExpression", {
} }
}, !process.env.BABEL_TYPES_8_BREAKING ? { }, !process.env.BABEL_TYPES_8_BREAKING ? {
optional: { optional: {
validate: (0, _utils.assertOneOf)(true, false), validate: (0, _utils.assertValueType)("boolean"),
optional: true optional: true
} }
} : {}) } : {})
@ -559,12 +548,10 @@ defineType("Program", {
optional: true optional: true
}, },
directives: { directives: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), validate: (0, _utils.arrayOfType)("Directive"),
default: [] default: []
}, },
body: { body: (0, _utils.validateArrayOfType)("Statement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
}
}, },
aliases: ["Scopable", "BlockParent", "Block"] aliases: ["Scopable", "BlockParent", "Block"]
}); });
@ -572,9 +559,7 @@ defineType("ObjectExpression", {
visitor: ["properties"], visitor: ["properties"],
aliases: ["Expression"], aliases: ["Expression"],
fields: { fields: {
properties: { properties: (0, _utils.validateArrayOfType)("ObjectMethod", "ObjectProperty", "SpreadElement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
}
} }
}); });
defineType("ObjectMethod", { defineType("ObjectMethod", {
@ -602,7 +587,7 @@ defineType("ObjectMethod", {
}() }()
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
body: { body: {
@ -634,33 +619,30 @@ defineType("ObjectProperty", {
validate: (0, _utils.assertNodeType)("Expression", "PatternLike") validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
}, },
shorthand: { shorthand: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, shorthand) {
if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!shorthand) return;
if (val && node.computed) { if (node.computed) {
throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
} }
}, { if (!(0, _is.default)("Identifier", node.key)) {
type: "boolean"
}), function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (val && !(0, _is.default)("Identifier", node.key)) {
throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
} }
}), }, {
type: "boolean"
})) : (0, _utils.assertValueType)("boolean"),
default: false default: false
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
} }
}, },
visitor: ["key", "value", "decorators"], visitor: ["key", "value", "decorators"],
aliases: ["UserWhitespacable", "Property", "ObjectMember"], aliases: ["UserWhitespacable", "Property", "ObjectMember"],
validate: function () { validate: !process.env.BABEL_TYPES_8_BREAKING ? undefined : function () {
const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssertion"); const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssertion");
const expression = (0, _utils.assertNodeType)("Expression"); const expression = (0, _utils.assertNodeType)("Expression");
return function (parent, key, node) { return function (parent, key, node) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
validator(node, "value", node.value); validator(node, "value", node.value);
}; };
@ -676,15 +658,14 @@ defineType("RestElement", {
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
} }
}), }),
validate(parent, key) { validate: process.env.BABEL_TYPES_8_BREAKING ? function (parent, key) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
const match = /(\w+)\[(\d+)\]/.exec(key); const match = /(\w+)\[(\d+)\]/.exec(key);
if (!match) throw new Error("Internal Babel error: malformed key."); if (!match) throw new Error("Internal Babel error: malformed key.");
const [, listKey, index] = match; const [, listKey, index] = match;
if (parent[listKey].length > +index + 1) { if (parent[listKey].length > +index + 1) {
throw new TypeError(`RestElement must be last element of ${listKey}`); throw new TypeError(`RestElement must be last element of ${listKey}`);
} }
} } : undefined
}); });
defineType("ReturnStatement", { defineType("ReturnStatement", {
visitor: ["argument"], visitor: ["argument"],
@ -699,9 +680,7 @@ defineType("ReturnStatement", {
defineType("SequenceExpression", { defineType("SequenceExpression", {
visitor: ["expressions"], visitor: ["expressions"],
fields: { fields: {
expressions: { expressions: (0, _utils.validateArrayOfType)("Expression")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
}
}, },
aliases: ["Expression"] aliases: ["Expression"]
}); });
@ -721,9 +700,7 @@ defineType("SwitchCase", {
validate: (0, _utils.assertNodeType)("Expression"), validate: (0, _utils.assertNodeType)("Expression"),
optional: true optional: true
}, },
consequent: { consequent: (0, _utils.validateArrayOfType)("Statement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
}
} }
}); });
defineType("SwitchStatement", { defineType("SwitchStatement", {
@ -733,9 +710,7 @@ defineType("SwitchStatement", {
discriminant: { discriminant: {
validate: (0, _utils.assertNodeType)("Expression") validate: (0, _utils.assertNodeType)("Expression")
}, },
cases: { cases: (0, _utils.validateArrayOfType)("SwitchCase")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
}
} }
}); });
defineType("ThisExpression", { defineType("ThisExpression", {
@ -755,14 +730,13 @@ defineType("TryStatement", {
aliases: ["Statement"], aliases: ["Statement"],
fields: { fields: {
block: { block: {
validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function (node) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function (node) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (!node.handler && !node.finalizer) { if (!node.handler && !node.finalizer) {
throw new TypeError("TryStatement expects either a handler or finalizer, or both"); throw new TypeError("TryStatement expects either a handler or finalizer, or both");
} }
}, { }, {
oneOfNodeTypes: ["BlockStatement"] oneOfNodeTypes: ["BlockStatement"]
})) })) : (0, _utils.assertNodeType)("BlockStatement")
}, },
handler: { handler: {
optional: true, optional: true,
@ -818,35 +792,30 @@ defineType("VariableDeclaration", {
kind: { kind: {
validate: (0, _utils.assertOneOf)("var", "let", "const", "using", "await using") validate: (0, _utils.assertOneOf)("var", "let", "const", "using", "await using")
}, },
declarations: { declarations: (0, _utils.validateArrayOfType)("VariableDeclarator")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
}
}, },
validate(parent, key, node) { validate: process.env.BABEL_TYPES_8_BREAKING ? (() => {
if (!process.env.BABEL_TYPES_8_BREAKING) return; const withoutInit = (0, _utils.assertNodeType)("Identifier");
if (!(0, _is.default)("ForXStatement", parent, { return function (parent, key, node) {
if ((0, _is.default)("ForXStatement", parent, {
left: node left: node
})) return; })) {
if (node.declarations.length !== 1) { if (node.declarations.length !== 1) {
throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
} }
} else {
node.declarations.forEach(decl => {
if (!decl.init) withoutInit(decl, "id", decl.id);
});
} }
};
})() : undefined
}); });
defineType("VariableDeclarator", { defineType("VariableDeclarator", {
visitor: ["id", "init"], visitor: ["id", "init"],
fields: { fields: {
id: { id: {
validate: function () { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern")
if (!process.env.BABEL_TYPES_8_BREAKING) {
return (0, _utils.assertNodeType)("LVal");
}
const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
const without = (0, _utils.assertNodeType)("Identifier");
return function (node, key, val) {
const validator = node.init ? normal : without;
validator(node, key, val);
};
}()
}, },
definite: { definite: {
optional: true, optional: true,
@ -894,7 +863,7 @@ defineType("AssignmentPattern", {
validate: (0, _utils.assertNodeType)("Expression") validate: (0, _utils.assertNodeType)("Expression")
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
} }
}) })
@ -929,9 +898,7 @@ defineType("ArrowFunctionExpression", {
defineType("ClassBody", { defineType("ClassBody", {
visitor: ["body"], visitor: ["body"],
fields: { fields: {
body: { body: (0, _utils.validateArrayOfType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")))
}
} }
}); });
defineType("ClassExpression", { defineType("ClassExpression", {
@ -959,11 +926,11 @@ defineType("ClassExpression", {
optional: true optional: true
}, },
implements: { implements: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), validate: (0, _utils.arrayOfType)("TSExpressionWithTypeArguments", "ClassImplements"),
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
mixins: { mixins: {
@ -996,11 +963,11 @@ defineType("ClassDeclaration", {
optional: true optional: true
}, },
implements: { implements: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), validate: (0, _utils.arrayOfType)("TSExpressionWithTypeArguments", "ClassImplements"),
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
mixins: { mixins: {
@ -1016,92 +983,84 @@ defineType("ClassDeclaration", {
optional: true optional: true
} }
}, },
validate: function () { validate: !process.env.BABEL_TYPES_8_BREAKING ? undefined : function () {
const identifier = (0, _utils.assertNodeType)("Identifier"); const identifier = (0, _utils.assertNodeType)("Identifier");
return function (parent, key, node) { return function (parent, key, node) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
identifier(node, "id", node.id); identifier(node, "id", node.id);
} }
}; };
}() }()
}); });
const importAttributes = exports.importAttributes = {
attributes: {
optional: true,
validate: (0, _utils.arrayOfType)("ImportAttribute")
},
assertions: {
deprecated: true,
optional: true,
validate: (0, _utils.arrayOfType)("ImportAttribute")
}
};
defineType("ExportAllDeclaration", { defineType("ExportAllDeclaration", {
builder: ["source"], builder: ["source"],
visitor: ["source", "attributes", "assertions"], visitor: ["source", "attributes", "assertions"],
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
fields: { fields: Object.assign({
source: { source: {
validate: (0, _utils.assertNodeType)("StringLiteral") validate: (0, _utils.assertNodeType)("StringLiteral")
}, },
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")), exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
attributes: { }, importAttributes)
optional: true,
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
},
assertions: {
optional: true,
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
}
}
}); });
defineType("ExportDefaultDeclaration", { defineType("ExportDefaultDeclaration", {
visitor: ["declaration"], visitor: ["declaration"],
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
fields: { fields: {
declaration: { declaration: (0, _utils.validateType)("TSDeclareFunction", "FunctionDeclaration", "ClassDeclaration", "Expression"),
validate: (0, _utils.assertNodeType)("TSDeclareFunction", "FunctionDeclaration", "ClassDeclaration", "Expression")
},
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value")) exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value"))
} }
}); });
defineType("ExportNamedDeclaration", { defineType("ExportNamedDeclaration", {
builder: ["declaration", "specifiers", "source"], builder: ["declaration", "specifiers", "source"],
visitor: ["declaration", "specifiers", "source", "attributes", "assertions"], visitor: process.env ? ["declaration", "specifiers", "source", "attributes"] : ["declaration", "specifiers", "source", "attributes", "assertions"],
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
fields: { fields: Object.assign({
declaration: { declaration: {
optional: true, optional: true,
validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (val && node.specifiers.length) { if (val && node.specifiers.length) {
throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
} }
}, {
oneOfNodeTypes: ["Declaration"]
}), function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (val && node.source) { if (val && node.source) {
throw new TypeError("Cannot export a declaration from a source"); throw new TypeError("Cannot export a declaration from a source");
} }
}) }, {
}, oneOfNodeTypes: ["Declaration"]
attributes: { })) : (0, _utils.assertNodeType)("Declaration")
optional: true, }
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, importAttributes, {
},
assertions: {
optional: true,
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
},
specifiers: { specifiers: {
default: [], default: [],
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () { validate: (0, _utils.arrayOf)(function () {
const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;
return function (node, key, val) { return Object.assign(function (node, key, val) {
const validator = node.source ? sourced : sourceless; const validator = node.source ? sourced : sourceless;
validator(node, key, val); validator(node, key, val);
}; }, {
}())) oneOfNodeTypes: ["ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"]
});
}())
}, },
source: { source: {
validate: (0, _utils.assertNodeType)("StringLiteral"), validate: (0, _utils.assertNodeType)("StringLiteral"),
optional: true optional: true
}, },
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
} })
}); });
defineType("ExportSpecifier", { defineType("ExportSpecifier", {
visitor: ["local", "exported"], visitor: ["local", "exported"],
@ -1131,13 +1090,15 @@ defineType("ForOfStatement", {
} }
const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression"); const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression");
return function (node, key, val) { return Object.assign(function (node, key, val) {
if ((0, _is.default)("VariableDeclaration", val)) { if ((0, _is.default)("VariableDeclaration", val)) {
declaration(node, key, val); declaration(node, key, val);
} else { } else {
lval(node, key, val); lval(node, key, val);
} }
}; }, {
oneOfNodeTypes: ["VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression"]
});
}() }()
}, },
right: { right: {
@ -1155,15 +1116,7 @@ defineType("ImportDeclaration", {
builder: ["specifiers", "source"], builder: ["specifiers", "source"],
visitor: ["specifiers", "source", "attributes", "assertions"], visitor: ["specifiers", "source", "attributes", "assertions"],
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"], aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"],
fields: { fields: Object.assign({}, importAttributes, {
attributes: {
optional: true,
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
},
assertions: {
optional: true,
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
},
module: { module: {
optional: true, optional: true,
validate: (0, _utils.assertValueType)("boolean") validate: (0, _utils.assertValueType)("boolean")
@ -1172,9 +1125,7 @@ defineType("ImportDeclaration", {
default: null, default: null,
validate: (0, _utils.assertOneOf)("source", "defer") validate: (0, _utils.assertOneOf)("source", "defer")
}, },
specifiers: { specifiers: (0, _utils.validateArrayOfType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
},
source: { source: {
validate: (0, _utils.assertNodeType)("StringLiteral") validate: (0, _utils.assertNodeType)("StringLiteral")
}, },
@ -1182,7 +1133,7 @@ defineType("ImportDeclaration", {
validate: (0, _utils.assertOneOf)("type", "typeof", "value"), validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
optional: true optional: true
} }
} })
}); });
defineType("ImportDefaultSpecifier", { defineType("ImportDefaultSpecifier", {
visitor: ["local"], visitor: ["local"],
@ -1241,8 +1192,7 @@ defineType("MetaProperty", {
aliases: ["Expression"], aliases: ["Expression"],
fields: { fields: {
meta: { meta: {
validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
let property; let property;
switch (val.name) { switch (val.name) {
case "function": case "function":
@ -1262,7 +1212,7 @@ defineType("MetaProperty", {
} }
}, { }, {
oneOfNodeTypes: ["Identifier"] oneOfNodeTypes: ["Identifier"]
})) })) : (0, _utils.assertNodeType)("Identifier")
}, },
property: { property: {
validate: (0, _utils.assertNodeType)("Identifier") validate: (0, _utils.assertNodeType)("Identifier")
@ -1304,9 +1254,7 @@ const classMethodOrPropertyCommon = () => ({
}); });
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
const classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(), classMethodOrPropertyCommon(), { const classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(), classMethodOrPropertyCommon(), {
params: { params: (0, _utils.validateArrayOfType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
},
kind: { kind: {
validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
default: "method" default: "method"
@ -1316,7 +1264,7 @@ const classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
} }
}); });
@ -1336,9 +1284,7 @@ defineType("ObjectPattern", {
builder: ["properties"], builder: ["properties"],
aliases: ["Pattern", "PatternLike", "LVal"], aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, patternLikeCommon(), { fields: Object.assign({}, patternLikeCommon(), {
properties: { properties: (0, _utils.validateArrayOfType)("RestElement", "ObjectProperty")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
}
}) })
}); });
defineType("SpreadElement", { defineType("SpreadElement", {
@ -1416,9 +1362,7 @@ defineType("TemplateLiteral", {
visitor: ["quasis", "expressions"], visitor: ["quasis", "expressions"],
aliases: ["Expression", "Literal"], aliases: ["Expression", "Literal"],
fields: { fields: {
quasis: { quasis: (0, _utils.validateArrayOfType)("TemplateElement"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
},
expressions: { expressions: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function (node, key, val) { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function (node, key, val) {
if (node.quasis.length !== val.length + 1) { if (node.quasis.length !== val.length + 1) {
@ -1434,14 +1378,13 @@ defineType("YieldExpression", {
aliases: ["Expression", "Terminatorless"], aliases: ["Expression", "Terminatorless"],
fields: { fields: {
delegate: { delegate: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) { validate: process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
if (val && !node.argument) { if (val && !node.argument) {
throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
} }
}, { }, {
type: "boolean" type: "boolean"
})), })) : (0, _utils.assertValueType)("boolean"),
default: false default: false
}, },
argument: { argument: {
@ -1518,9 +1461,7 @@ defineType("OptionalCallExpression", {
callee: { callee: {
validate: (0, _utils.assertNodeType)("Expression") validate: (0, _utils.assertNodeType)("Expression")
}, },
arguments: { arguments: (0, _utils.validateArrayOfType)("Expression", "SpreadElement", "ArgumentPlaceholder"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "ArgumentPlaceholder")))
},
optional: { optional: {
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
}, },
@ -1552,7 +1493,7 @@ defineType("ClassProperty", {
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
readonly: { readonly: {
@ -1597,7 +1538,7 @@ defineType("ClassAccessorProperty", {
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
readonly: { readonly: {
@ -1631,7 +1572,7 @@ defineType("ClassPrivateProperty", {
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
}, },
static: { static: {
@ -1681,9 +1622,7 @@ defineType("PrivateName", {
defineType("StaticBlock", { defineType("StaticBlock", {
visitor: ["body"], visitor: ["body"],
fields: { fields: {
body: { body: (0, _utils.validateArrayOfType)("Statement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
}
}, },
aliases: ["Scopable", "BlockParent", "FunctionParent"] aliases: ["Scopable", "BlockParent", "FunctionParent"]
}); });

File diff suppressed because one or more lines are too long

@ -71,21 +71,20 @@ var _utils = require("./utils.js");
visitor: ["properties"], visitor: ["properties"],
aliases: ["Expression"], aliases: ["Expression"],
fields: { fields: {
properties: { properties: (0, _utils.validateArrayOfType)("ObjectProperty", "SpreadElement")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
}
} }
}); });
(0, _utils.default)("TupleExpression", { (0, _utils.default)("TupleExpression", {
fields: { fields: {
elements: { elements: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))), validate: (0, _utils.arrayOfType)("Expression", "SpreadElement"),
default: [] default: []
} }
}, },
visitor: ["elements"], visitor: ["elements"],
aliases: ["Expression"] aliases: ["Expression"]
}); });
{
(0, _utils.default)("DecimalLiteral", { (0, _utils.default)("DecimalLiteral", {
builder: ["value"], builder: ["value"],
fields: { fields: {
@ -95,6 +94,7 @@ var _utils = require("./utils.js");
}, },
aliases: ["Expression", "Pureish", "Literal", "Immutable"] aliases: ["Expression", "Pureish", "Literal", "Immutable"]
}); });
}
(0, _utils.default)("ModuleExpression", { (0, _utils.default)("ModuleExpression", {
visitor: ["body"], visitor: ["body"],
fields: { fields: {

File diff suppressed because one or more lines are too long

@ -1,5 +1,6 @@
"use strict"; "use strict";
var _core = require("./core.js");
var _utils = require("./utils.js"); var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("Flow"); const defineType = (0, _utils.defineAliasedType)("Flow");
const defineInterfaceishType = name => { const defineInterfaceishType = name => {
@ -65,7 +66,7 @@ defineType("DeclareModule", {
visitor: ["id", "body"], visitor: ["id", "body"],
aliases: ["FlowDeclaration", "Statement", "Declaration"], aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: { fields: {
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), id: (0, _utils.validateType)("Identifier", "StringLiteral"),
body: (0, _utils.validateType)("BlockStatement"), body: (0, _utils.validateType)("BlockStatement"),
kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
} }
@ -104,22 +105,22 @@ defineType("DeclareVariable", {
} }
}); });
defineType("DeclareExportDeclaration", { defineType("DeclareExportDeclaration", {
visitor: ["declaration", "specifiers", "source"], visitor: ["declaration", "specifiers", "source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"], aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: { fields: Object.assign({
declaration: (0, _utils.validateOptionalType)("Flow"), declaration: (0, _utils.validateOptionalType)("Flow"),
specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ExportSpecifier", "ExportNamespaceSpecifier")),
source: (0, _utils.validateOptionalType)("StringLiteral"), source: (0, _utils.validateOptionalType)("StringLiteral"),
default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
} }, _core.importAttributes)
}); });
defineType("DeclareExportAllDeclaration", { defineType("DeclareExportAllDeclaration", {
visitor: ["source"], visitor: ["source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"], aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: { fields: Object.assign({
source: (0, _utils.validateType)("StringLiteral"), source: (0, _utils.validateType)("StringLiteral"),
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
} }, _core.importAttributes)
}); });
defineType("DeclaredPredicate", { defineType("DeclaredPredicate", {
visitor: ["value"], visitor: ["value"],
@ -136,7 +137,7 @@ defineType("FunctionTypeAnnotation", {
aliases: ["FlowType"], aliases: ["FlowType"],
fields: { fields: {
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), params: (0, _utils.validateArrayOfType)("FunctionTypeParam"),
rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
this: (0, _utils.validateOptionalType)("FunctionTypeParam"), this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
returnType: (0, _utils.validateType)("FlowType") returnType: (0, _utils.validateType)("FlowType")
@ -154,7 +155,7 @@ defineType("GenericTypeAnnotation", {
visitor: ["id", "typeParameters"], visitor: ["id", "typeParameters"],
aliases: ["FlowType"], aliases: ["FlowType"],
fields: { fields: {
id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
} }
}); });
@ -164,7 +165,7 @@ defineType("InferredPredicate", {
defineType("InterfaceExtends", { defineType("InterfaceExtends", {
visitor: ["id", "typeParameters"], visitor: ["id", "typeParameters"],
fields: { fields: {
id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
} }
}); });
@ -212,7 +213,7 @@ defineType("ObjectTypeAnnotation", {
aliases: ["FlowType"], aliases: ["FlowType"],
builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
fields: { fields: {
properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), properties: (0, _utils.validate)((0, _utils.arrayOfType)("ObjectTypeProperty", "ObjectTypeSpreadProperty")),
indexers: { indexers: {
validate: (0, _utils.arrayOfType)("ObjectTypeIndexer"), validate: (0, _utils.arrayOfType)("ObjectTypeIndexer"),
optional: true, optional: true,
@ -271,7 +272,7 @@ defineType("ObjectTypeProperty", {
visitor: ["key", "value", "variance"], visitor: ["key", "value", "variance"],
aliases: ["UserWhitespacable"], aliases: ["UserWhitespacable"],
fields: { fields: {
key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), key: (0, _utils.validateType)("Identifier", "StringLiteral"),
value: (0, _utils.validateType)("FlowType"), value: (0, _utils.validateType)("FlowType"),
kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
@ -303,7 +304,7 @@ defineType("QualifiedTypeIdentifier", {
builder: ["id", "qualification"], builder: ["id", "qualification"],
fields: { fields: {
id: (0, _utils.validateType)("Identifier"), id: (0, _utils.validateType)("Identifier"),
qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) qualification: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier")
} }
}); });
defineType("StringLiteralTypeAnnotation", { defineType("StringLiteralTypeAnnotation", {
@ -401,7 +402,7 @@ defineType("EnumDeclaration", {
visitor: ["id", "body"], visitor: ["id", "body"],
fields: { fields: {
id: (0, _utils.validateType)("Identifier"), id: (0, _utils.validateType)("Identifier"),
body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) body: (0, _utils.validateType)("EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody")
} }
}); });
defineType("EnumBooleanBody", { defineType("EnumBooleanBody", {
@ -427,7 +428,7 @@ defineType("EnumStringBody", {
visitor: ["members"], visitor: ["members"],
fields: { fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]), members: (0, _utils.validateArrayOfType)("EnumStringMember", "EnumDefaultedMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
} }
}); });

File diff suppressed because one or more lines are too long

@ -70,7 +70,6 @@ Object.defineProperty(exports, "VISITOR_KEYS", {
return _utils.VISITOR_KEYS; return _utils.VISITOR_KEYS;
} }
}); });
var _toFastProperties = require("to-fast-properties");
require("./core.js"); require("./core.js");
require("./flow.js"); require("./flow.js");
require("./jsx.js"); require("./jsx.js");
@ -83,14 +82,6 @@ var _deprecatedAliases = require("./deprecated-aliases.js");
Object.keys(_deprecatedAliases.DEPRECATED_ALIASES).forEach(deprecatedAlias => { Object.keys(_deprecatedAliases.DEPRECATED_ALIASES).forEach(deprecatedAlias => {
_utils.FLIPPED_ALIAS_KEYS[deprecatedAlias] = _utils.FLIPPED_ALIAS_KEYS[_deprecatedAliases.DEPRECATED_ALIASES[deprecatedAlias]]; _utils.FLIPPED_ALIAS_KEYS[deprecatedAlias] = _utils.FLIPPED_ALIAS_KEYS[_deprecatedAliases.DEPRECATED_ALIASES[deprecatedAlias]];
}); });
_toFastProperties(_utils.VISITOR_KEYS);
_toFastProperties(_utils.ALIAS_KEYS);
_toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
_toFastProperties(_utils.NODE_FIELDS);
_toFastProperties(_utils.BUILDER_KEYS);
_toFastProperties(_utils.DEPRECATED_KEYS);
_toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
_toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES = exports.TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); const TYPES = exports.TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS));
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map

@ -1 +1 @@
{"version":3,"names":["_toFastProperties","require","_utils","_placeholders","_deprecatedAliases","Object","keys","DEPRECATED_ALIASES","forEach","deprecatedAlias","FLIPPED_ALIAS_KEYS","toFastProperties","VISITOR_KEYS","ALIAS_KEYS","NODE_FIELDS","BUILDER_KEYS","DEPRECATED_KEYS","PLACEHOLDERS_ALIAS","PLACEHOLDERS_FLIPPED_ALIAS","TYPES","exports","concat"],"sources":["../../src/definitions/index.ts"],"sourcesContent":["import toFastProperties from \"to-fast-properties\";\nimport \"./core.ts\";\nimport \"./flow.ts\";\nimport \"./jsx.ts\";\nimport \"./misc.ts\";\nimport \"./experimental.ts\";\nimport \"./typescript.ts\";\nimport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n} from \"./utils.ts\";\nimport {\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n} from \"./placeholders.ts\";\nimport { DEPRECATED_ALIASES } from \"./deprecated-aliases.ts\";\n\n(\n Object.keys(DEPRECATED_ALIASES) as (keyof typeof DEPRECATED_ALIASES)[]\n).forEach(deprecatedAlias => {\n FLIPPED_ALIAS_KEYS[deprecatedAlias] =\n FLIPPED_ALIAS_KEYS[DEPRECATED_ALIASES[deprecatedAlias]];\n});\n\n// We do this here, because at this point the visitor keys should be ready and setup\ntoFastProperties(VISITOR_KEYS);\ntoFastProperties(ALIAS_KEYS);\ntoFastProperties(FLIPPED_ALIAS_KEYS);\ntoFastProperties(NODE_FIELDS);\ntoFastProperties(BUILDER_KEYS);\ntoFastProperties(DEPRECATED_KEYS);\n\ntoFastProperties(PLACEHOLDERS_ALIAS);\ntoFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);\n\nconst TYPES: Array<string> = [].concat(\n Object.keys(VISITOR_KEYS),\n Object.keys(FLIPPED_ALIAS_KEYS),\n Object.keys(DEPRECATED_KEYS),\n);\n\nexport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_ALIASES,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n TYPES,\n};\n\nexport type { FieldOptions } from \"./utils.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAH,OAAA;AAGEI,MAAM,CAACC,IAAI,CAACC,qCAAkB,CAAC,CAC/BC,OAAO,CAACC,eAAe,IAAI;EAC3BC,yBAAkB,CAACD,eAAe,CAAC,GACjCC,yBAAkB,CAACH,qCAAkB,CAACE,eAAe,CAAC,CAAC;AAC3D,CAAC,CAAC;AAGFE,iBAAgB,CAACC,mBAAY,CAAC;AAC9BD,iBAAgB,CAACE,iBAAU,CAAC;AAC5BF,iBAAgB,CAACD,yBAAkB,CAAC;AACpCC,iBAAgB,CAACG,kBAAW,CAAC;AAC7BH,iBAAgB,CAACI,mBAAY,CAAC;AAC9BJ,iBAAgB,CAACK,sBAAe,CAAC;AAEjCL,iBAAgB,CAACM,gCAAkB,CAAC;AACpCN,iBAAgB,CAACO,wCAA0B,CAAC;AAE5C,MAAMC,KAAoB,GAAAC,OAAA,CAAAD,KAAA,GAAG,EAAE,CAACE,MAAM,CACpChB,MAAM,CAACC,IAAI,CAACM,mBAAY,CAAC,EACzBP,MAAM,CAACC,IAAI,CAACI,yBAAkB,CAAC,EAC/BL,MAAM,CAACC,IAAI,CAACU,sBAAe,CAC7B,CAAC","ignoreList":[]} {"version":3,"names":["require","_utils","_placeholders","_deprecatedAliases","Object","keys","DEPRECATED_ALIASES","forEach","deprecatedAlias","FLIPPED_ALIAS_KEYS","TYPES","exports","concat","VISITOR_KEYS","DEPRECATED_KEYS"],"sources":["../../src/definitions/index.ts"],"sourcesContent":["import \"./core.ts\";\nimport \"./flow.ts\";\nimport \"./jsx.ts\";\nimport \"./misc.ts\";\nimport \"./experimental.ts\";\nimport \"./typescript.ts\";\nimport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n} from \"./utils.ts\";\nimport {\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n} from \"./placeholders.ts\";\nimport { DEPRECATED_ALIASES } from \"./deprecated-aliases.ts\";\n\n(\n Object.keys(DEPRECATED_ALIASES) as (keyof typeof DEPRECATED_ALIASES)[]\n).forEach(deprecatedAlias => {\n FLIPPED_ALIAS_KEYS[deprecatedAlias] =\n FLIPPED_ALIAS_KEYS[DEPRECATED_ALIASES[deprecatedAlias]];\n});\n\nconst TYPES: Array<string> = [].concat(\n Object.keys(VISITOR_KEYS),\n Object.keys(FLIPPED_ALIAS_KEYS),\n Object.keys(DEPRECATED_KEYS),\n);\n\nexport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_ALIASES,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n TYPES,\n};\n\nexport type { FieldOptions } from \"./utils.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAH,OAAA;AAGEI,MAAM,CAACC,IAAI,CAACC,qCAAkB,CAAC,CAC/BC,OAAO,CAACC,eAAe,IAAI;EAC3BC,yBAAkB,CAACD,eAAe,CAAC,GACjCC,yBAAkB,CAACH,qCAAkB,CAACE,eAAe,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAME,KAAoB,GAAAC,OAAA,CAAAD,KAAA,GAAG,EAAE,CAACE,MAAM,CACpCR,MAAM,CAACC,IAAI,CAACQ,mBAAY,CAAC,EACzBT,MAAM,CAACC,IAAI,CAACI,yBAAkB,CAAC,EAC/BL,MAAM,CAACC,IAAI,CAACS,sBAAe,CAC7B,CAAC","ignoreList":[]}

@ -36,9 +36,7 @@ defineType("JSXElement", {
optional: true, optional: true,
validate: (0, _utils.assertNodeType)("JSXClosingElement") validate: (0, _utils.assertNodeType)("JSXClosingElement")
}, },
children: { children: (0, _utils.validateArrayOfType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
}
}, { }, {
selfClosing: { selfClosing: {
validate: (0, _utils.assertValueType)("boolean"), validate: (0, _utils.assertValueType)("boolean"),
@ -106,9 +104,7 @@ defineType("JSXOpeningElement", {
selfClosing: { selfClosing: {
default: false default: false
}, },
attributes: { attributes: (0, _utils.validateArrayOfType)("JSXAttribute", "JSXSpreadAttribute"),
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
},
typeParameters: { typeParameters: {
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
optional: true optional: true
@ -143,9 +139,7 @@ defineType("JSXFragment", {
closingFragment: { closingFragment: {
validate: (0, _utils.assertNodeType)("JSXClosingFragment") validate: (0, _utils.assertNodeType)("JSXClosingFragment")
}, },
children: { children: (0, _utils.validateArrayOfType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
}
} }
}); });
defineType("JSXOpeningFragment", { defineType("JSXOpeningFragment", {

File diff suppressed because one or more lines are too long

@ -2,6 +2,7 @@
var _utils = require("./utils.js"); var _utils = require("./utils.js");
var _placeholders = require("./placeholders.js"); var _placeholders = require("./placeholders.js");
var _core = require("./core.js");
const defineType = (0, _utils.defineAliasedType)("Miscellaneous"); const defineType = (0, _utils.defineAliasedType)("Miscellaneous");
{ {
defineType("Noop", { defineType("Noop", {
@ -11,14 +12,14 @@ const defineType = (0, _utils.defineAliasedType)("Miscellaneous");
defineType("Placeholder", { defineType("Placeholder", {
visitor: [], visitor: [],
builder: ["expectedNode", "name"], builder: ["expectedNode", "name"],
fields: { fields: Object.assign({
name: { name: {
validate: (0, _utils.assertNodeType)("Identifier") validate: (0, _utils.assertNodeType)("Identifier")
}, },
expectedNode: { expectedNode: {
validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
} }
} }, (0, _core.patternLikeCommon)())
}); });
defineType("V8IntrinsicIdentifier", { defineType("V8IntrinsicIdentifier", {
builder: ["name"], builder: ["name"],

@ -1 +1 @@
{"version":3,"names":["_utils","require","_placeholders","defineType","defineAliasedType","visitor","builder","fields","name","validate","assertNodeType","expectedNode","assertOneOf","PLACEHOLDERS","assertValueType"],"sources":["../../src/definitions/misc.ts"],"sourcesContent":["import {\n defineAliasedType,\n assertNodeType,\n assertOneOf,\n assertValueType,\n} from \"./utils.ts\";\nimport { PLACEHOLDERS } from \"./placeholders.ts\";\n\nconst defineType = defineAliasedType(\"Miscellaneous\");\n\nif (!process.env.BABEL_8_BREAKING) {\n defineType(\"Noop\", {\n visitor: [],\n });\n}\n\ndefineType(\"Placeholder\", {\n visitor: [],\n builder: [\"expectedNode\", \"name\"],\n // aliases: [], defined in placeholders.js\n fields: {\n name: {\n validate: assertNodeType(\"Identifier\"),\n },\n expectedNode: {\n validate: assertOneOf(...PLACEHOLDERS),\n },\n },\n});\n\ndefineType(\"V8IntrinsicIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,aAAA,GAAAD,OAAA;AAEA,MAAME,UAAU,GAAG,IAAAC,wBAAiB,EAAC,eAAe,CAAC;AAElB;EACjCD,UAAU,CAAC,MAAM,EAAE;IACjBE,OAAO,EAAE;EACX,CAAC,CAAC;AACJ;AAEAF,UAAU,CAAC,aAAa,EAAE;EACxBE,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC;EAEjCC,MAAM,EAAE;IACNC,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAC,qBAAc,EAAC,YAAY;IACvC,CAAC;IACDC,YAAY,EAAE;MACZF,QAAQ,EAAE,IAAAG,kBAAW,EAAC,GAAGC,0BAAY;IACvC;EACF;AACF,CAAC,CAAC;AAEFV,UAAU,CAAC,uBAAuB,EAAE;EAClCG,OAAO,EAAE,CAAC,MAAM,CAAC;EACjBC,MAAM,EAAE;IACNC,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAK,sBAAe,EAAC,QAAQ;IACpC;EACF;AACF,CAAC,CAAC","ignoreList":[]} {"version":3,"names":["_utils","require","_placeholders","_core","defineType","defineAliasedType","visitor","builder","fields","Object","assign","name","validate","assertNodeType","expectedNode","assertOneOf","PLACEHOLDERS","patternLikeCommon","assertValueType"],"sources":["../../src/definitions/misc.ts"],"sourcesContent":["import {\n defineAliasedType,\n assertNodeType,\n assertOneOf,\n assertValueType,\n} from \"./utils.ts\";\nimport { PLACEHOLDERS } from \"./placeholders.ts\";\nimport { patternLikeCommon } from \"./core.ts\";\n\nconst defineType = defineAliasedType(\"Miscellaneous\");\n\nif (!process.env.BABEL_8_BREAKING) {\n defineType(\"Noop\", {\n visitor: [],\n });\n}\n\ndefineType(\"Placeholder\", {\n visitor: [],\n builder: [\"expectedNode\", \"name\"],\n // aliases: [], defined in placeholders.js\n fields: {\n name: {\n validate: assertNodeType(\"Identifier\"),\n },\n expectedNode: {\n validate: assertOneOf(...PLACEHOLDERS),\n },\n ...patternLikeCommon(),\n },\n});\n\ndefineType(\"V8IntrinsicIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,MAAMG,UAAU,GAAG,IAAAC,wBAAiB,EAAC,eAAe,CAAC;AAElB;EACjCD,UAAU,CAAC,MAAM,EAAE;IACjBE,OAAO,EAAE;EACX,CAAC,CAAC;AACJ;AAEAF,UAAU,CAAC,aAAa,EAAE;EACxBE,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC;EAEjCC,MAAM,EAAAC,MAAA,CAAAC,MAAA;IACJC,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAC,qBAAc,EAAC,YAAY;IACvC,CAAC;IACDC,YAAY,EAAE;MACZF,QAAQ,EAAE,IAAAG,kBAAW,EAAC,GAAGC,0BAAY;IACvC;EAAC,GACE,IAAAC,uBAAiB,EAAC,CAAC;AAE1B,CAAC,CAAC;AAEFb,UAAU,CAAC,uBAAuB,EAAE;EAClCG,OAAO,EAAE,CAAC,MAAM,CAAC;EACjBC,MAAM,EAAE;IACNG,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAM,sBAAe,EAAC,QAAQ;IACpC;EACF;AACF,CAAC,CAAC","ignoreList":[]}

@ -35,7 +35,7 @@ defineType("TSParameterProperty", {
optional: true optional: true
}, },
decorators: { decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), validate: (0, _utils.arrayOfType)("Decorator"),
optional: true optional: true
} }
} }
@ -59,7 +59,7 @@ defineType("TSQualifiedName", {
}); });
const signatureDeclarationCommon = () => ({ const signatureDeclarationCommon = () => ({
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
["parameters"]: (0, _utils.validateArrayOfType)(["ArrayPattern", "Identifier", "ObjectPattern", "RestElement"]), ["parameters"]: (0, _utils.validateArrayOfType)("ArrayPattern", "Identifier", "ObjectPattern", "RestElement"),
["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation") ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation")
}); });
const callConstructSignatureDeclaration = { const callConstructSignatureDeclaration = {
@ -144,7 +144,7 @@ defineType("TSTypePredicate", {
visitor: ["parameterName", "typeAnnotation"], visitor: ["parameterName", "typeAnnotation"],
builder: ["parameterName", "typeAnnotation", "asserts"], builder: ["parameterName", "typeAnnotation", "asserts"],
fields: { fields: {
parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), parameterName: (0, _utils.validateType)("Identifier", "TSThisType"),
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
asserts: (0, _utils.validateOptional)(bool) asserts: (0, _utils.validateOptional)(bool)
} }
@ -153,7 +153,7 @@ defineType("TSTypeQuery", {
aliases: ["TSType"], aliases: ["TSType"],
visitor: ["exprName", "typeParameters"], visitor: ["exprName", "typeParameters"],
fields: { fields: {
exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]), exprName: (0, _utils.validateType)("TSEntityName", "TSImportType"),
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
} }
}); });
@ -175,7 +175,7 @@ defineType("TSTupleType", {
aliases: ["TSType"], aliases: ["TSType"],
visitor: ["elementTypes"], visitor: ["elementTypes"],
fields: { fields: {
elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"]) elementTypes: (0, _utils.validateArrayOfType)("TSType", "TSNamedTupleMember")
} }
}); });
defineType("TSOptionalType", { defineType("TSOptionalType", {
@ -257,13 +257,14 @@ defineType("TSMappedType", {
aliases: ["TSType"], aliases: ["TSType"],
visitor: ["typeParameter", "nameType", "typeAnnotation"], visitor: ["typeParameter", "nameType", "typeAnnotation"],
builder: ["typeParameter", "typeAnnotation", "nameType"], builder: ["typeParameter", "typeAnnotation", "nameType"],
fields: { fields: Object.assign({}, {
typeParameter: (0, _utils.validateType)("TSTypeParameter")
}, {
readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
typeParameter: (0, _utils.validateType)("TSTypeParameter"),
optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
typeAnnotation: (0, _utils.validateOptionalType)("TSType"), typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
nameType: (0, _utils.validateOptionalType)("TSType") nameType: (0, _utils.validateOptionalType)("TSType")
} })
}); });
defineType("TSLiteralType", { defineType("TSLiteralType", {
aliases: ["TSType", "TSBaseType"], aliases: ["TSType", "TSBaseType"],
@ -288,14 +289,17 @@ defineType("TSLiteralType", {
} }
} }
}); });
defineType("TSExpressionWithTypeArguments", { const expressionWithTypeArguments = {
aliases: ["TSType"], aliases: ["TSType"],
visitor: ["expression", "typeParameters"], visitor: ["expression", "typeParameters"],
fields: { fields: {
expression: (0, _utils.validateType)("TSEntityName"), expression: (0, _utils.validateType)("TSEntityName"),
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
} }
}); };
{
defineType("TSExpressionWithTypeArguments", expressionWithTypeArguments);
}
defineType("TSInterfaceDeclaration", { defineType("TSInterfaceDeclaration", {
aliases: ["Statement", "Declaration"], aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "extends", "body"], visitor: ["id", "typeParameters", "extends", "body"],
@ -363,7 +367,7 @@ defineType("TSEnumDeclaration", {
defineType("TSEnumMember", { defineType("TSEnumMember", {
visitor: ["id", "initializer"], visitor: ["id", "initializer"],
fields: { fields: {
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), id: (0, _utils.validateType)("Identifier", "StringLiteral"),
initializer: (0, _utils.validateOptionalType)("Expression") initializer: (0, _utils.validateOptionalType)("Expression")
} }
}); });
@ -371,10 +375,13 @@ defineType("TSModuleDeclaration", {
aliases: ["Statement", "Declaration"], aliases: ["Statement", "Declaration"],
visitor: ["id", "body"], visitor: ["id", "body"],
fields: { fields: {
kind: {
validate: (0, _utils.assertOneOf)("global", "module", "namespace")
},
declare: (0, _utils.validateOptional)(bool), declare: (0, _utils.validateOptional)(bool),
global: (0, _utils.validateOptional)(bool), global: (0, _utils.validateOptional)(bool),
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), id: (0, _utils.validateType)("Identifier", "StringLiteral"),
body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) body: (0, _utils.validateType)("TSModuleBlock", "TSModuleDeclaration")
} }
}); });
defineType("TSModuleBlock", { defineType("TSModuleBlock", {
@ -403,7 +410,7 @@ defineType("TSImportEqualsDeclaration", {
fields: { fields: {
isExport: (0, _utils.validate)(bool), isExport: (0, _utils.validate)(bool),
id: (0, _utils.validateType)("Identifier"), id: (0, _utils.validateType)("Identifier"),
moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]), moduleReference: (0, _utils.validateType)("TSEntityName", "TSExternalModuleReference"),
importKind: { importKind: {
validate: (0, _utils.assertOneOf)("type", "value"), validate: (0, _utils.assertOneOf)("type", "value"),
optional: true optional: true
@ -448,17 +455,13 @@ defineType("TSTypeAnnotation", {
defineType("TSTypeParameterInstantiation", { defineType("TSTypeParameterInstantiation", {
visitor: ["params"], visitor: ["params"],
fields: { fields: {
params: { params: (0, _utils.validateArrayOfType)("TSType")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
}
} }
}); });
defineType("TSTypeParameterDeclaration", { defineType("TSTypeParameterDeclaration", {
visitor: ["params"], visitor: ["params"],
fields: { fields: {
params: { params: (0, _utils.validateArrayOfType)("TSTypeParameter")
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
}
} }
}); });
defineType("TSTypeParameter", { defineType("TSTypeParameter", {

File diff suppressed because one or more lines are too long

@ -16,7 +16,6 @@ exports.assertValueType = assertValueType;
exports.chain = chain; exports.chain = chain;
exports.default = defineType; exports.default = defineType;
exports.defineAliasedType = defineAliasedType; exports.defineAliasedType = defineAliasedType;
exports.typeIs = typeIs;
exports.validate = validate; exports.validate = validate;
exports.validateArrayOfType = validateArrayOfType; exports.validateArrayOfType = validateArrayOfType;
exports.validateOptional = validateOptional; exports.validateOptional = validateOptional;
@ -45,11 +44,8 @@ function validate(validate) {
validate validate
}; };
} }
function typeIs(typeName) { function validateType(...typeNames) {
return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); return validate(assertNodeType(...typeNames));
}
function validateType(typeName) {
return validate(typeIs(typeName));
} }
function validateOptional(validate) { function validateOptional(validate) {
return { return {
@ -57,29 +53,30 @@ function validateOptional(validate) {
optional: true optional: true
}; };
} }
function validateOptionalType(typeName) { function validateOptionalType(...typeNames) {
return { return {
validate: typeIs(typeName), validate: assertNodeType(...typeNames),
optional: true optional: true
}; };
} }
function arrayOf(elementType) { function arrayOf(elementType) {
return chain(assertValueType("array"), assertEach(elementType)); return chain(assertValueType("array"), assertEach(elementType));
} }
function arrayOfType(typeName) { function arrayOfType(...typeNames) {
return arrayOf(typeIs(typeName)); return arrayOf(assertNodeType(...typeNames));
} }
function validateArrayOfType(typeName) { function validateArrayOfType(...typeNames) {
return validate(arrayOfType(typeName)); return validate(arrayOfType(...typeNames));
} }
function assertEach(callback) { function assertEach(callback) {
const childValidator = process.env.BABEL_TYPES_8_BREAKING ? _validate.validateChild : () => {};
function validator(node, key, val) { function validator(node, key, val) {
if (!Array.isArray(val)) return; if (!Array.isArray(val)) return;
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
const subkey = `${key}[${i}]`; const subkey = `${key}[${i}]`;
const v = val[i]; const v = val[i];
callback(node, subkey, v); callback(node, subkey, v);
if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); childValidator(node, subkey, v);
} }
} }
validator.each = callback; validator.each = callback;
@ -187,8 +184,8 @@ function chain(...fns) {
} }
return validate; return validate;
} }
const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; const validTypeOpts = new Set(["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]);
const validFieldKeys = ["default", "optional", "deprecated", "validate"]; const validFieldKeys = new Set(["default", "optional", "deprecated", "validate"]);
const store = {}; const store = {};
function defineAliasedType(...aliases) { function defineAliasedType(...aliases) {
return (type, opts = {}) => { return (type, opts = {}) => {
@ -230,7 +227,7 @@ function defineType(type, opts = {}) {
const aliases = opts.aliases || inherits.aliases || []; const aliases = opts.aliases || inherits.aliases || [];
const builder = opts.builder || inherits.builder || opts.visitor || []; const builder = opts.builder || inherits.builder || opts.visitor || [];
for (const k of Object.keys(opts)) { for (const k of Object.keys(opts)) {
if (!validTypeOpts.includes(k)) { if (!validTypeOpts.has(k)) {
throw new Error(`Unknown type option "${k}" on ${type}`); throw new Error(`Unknown type option "${k}" on ${type}`);
} }
} }
@ -251,7 +248,7 @@ function defineType(type, opts = {}) {
field.validate = assertValueType(getType(field.default)); field.validate = assertValueType(getType(field.default));
} }
for (const k of Object.keys(field)) { for (const k of Object.keys(field)) {
if (!validFieldKeys.includes(k)) { if (!validFieldKeys.has(k)) {
throw new Error(`Unknown field key "${k}" on ${type}.${key}`); throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
} }
} }

File diff suppressed because one or more lines are too long

@ -93,7 +93,7 @@ export interface CallExpression extends BaseNode {
type: "CallExpression"; type: "CallExpression";
callee: Expression | Super | V8IntrinsicIdentifier; callee: Expression | Super | V8IntrinsicIdentifier;
arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>; arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>;
optional: true | false | null; optional: boolean | null;
typeArguments: TypeParameterInstantiation | null; typeArguments: TypeParameterInstantiation | null;
typeParameters: TSTypeParameterInstantiation | null; typeParameters: TSTypeParameterInstantiation | null;
} }
@ -240,14 +240,14 @@ export interface MemberExpression extends BaseNode {
object: Expression | Super; object: Expression | Super;
property: Expression | Identifier | PrivateName; property: Expression | Identifier | PrivateName;
computed: boolean; computed: boolean;
optional: true | false | null; optional: boolean | null;
} }
export interface NewExpression extends BaseNode { export interface NewExpression extends BaseNode {
type: "NewExpression"; type: "NewExpression";
callee: Expression | Super | V8IntrinsicIdentifier; callee: Expression | Super | V8IntrinsicIdentifier;
arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>; arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>;
optional: true | false | null; optional: boolean | null;
typeArguments: TypeParameterInstantiation | null; typeArguments: TypeParameterInstantiation | null;
typeParameters: TSTypeParameterInstantiation | null; typeParameters: TSTypeParameterInstantiation | null;
} }
@ -784,12 +784,16 @@ export interface DeclareExportDeclaration extends BaseNode {
declaration: Flow | null; declaration: Flow | null;
specifiers: Array<ExportSpecifier | ExportNamespaceSpecifier> | null; specifiers: Array<ExportSpecifier | ExportNamespaceSpecifier> | null;
source: StringLiteral | null; source: StringLiteral | null;
attributes: Array<ImportAttribute> | null;
assertions: Array<ImportAttribute> | null;
default: boolean | null; default: boolean | null;
} }
export interface DeclareExportAllDeclaration extends BaseNode { export interface DeclareExportAllDeclaration extends BaseNode {
type: "DeclareExportAllDeclaration"; type: "DeclareExportAllDeclaration";
source: StringLiteral; source: StringLiteral;
attributes: Array<ImportAttribute> | null;
assertions: Array<ImportAttribute> | null;
exportKind: "type" | "value" | null; exportKind: "type" | "value" | null;
} }
@ -1177,6 +1181,9 @@ export interface Placeholder extends BaseNode {
type: "Placeholder"; type: "Placeholder";
expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
name: Identifier; name: Identifier;
decorators: Array<Decorator> | null;
optional: boolean | null;
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
} }
export interface V8IntrinsicIdentifier extends BaseNode { export interface V8IntrinsicIdentifier extends BaseNode {
@ -1591,6 +1598,7 @@ export interface TSModuleDeclaration extends BaseNode {
body: TSModuleBlock | TSModuleDeclaration; body: TSModuleBlock | TSModuleDeclaration;
declare: boolean | null; declare: boolean | null;
global: boolean | null; global: boolean | null;
kind: "global" | "module" | "namespace";
} }
export interface TSModuleBlock extends BaseNode { export interface TSModuleBlock extends BaseNode {
@ -1813,7 +1821,7 @@ export function nullLiteral(): NullLiteral;
export function booleanLiteral(value: boolean): BooleanLiteral; export function booleanLiteral(value: boolean): BooleanLiteral;
export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
export function memberExpression(object: Expression | Super, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression; export function memberExpression(object: Expression | Super, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: boolean | null): MemberExpression;
export function newExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>): NewExpression; export function newExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>): NewExpression;
export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression; export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
@ -1887,8 +1895,8 @@ export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareMod
export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias;
export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType;
export function declareVariable(id: Identifier): DeclareVariable; export function declareVariable(id: Identifier): DeclareVariable;
export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration; export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null, attributes?: Array<ImportAttribute> | null): DeclareExportDeclaration;
export function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; export function declareExportAllDeclaration(source: StringLiteral, attributes?: Array<ImportAttribute> | null): DeclareExportAllDeclaration;
export function declaredPredicate(value: Flow): DeclaredPredicate; export function declaredPredicate(value: Flow): DeclaredPredicate;
export function existsTypeAnnotation(): ExistsTypeAnnotation; export function existsTypeAnnotation(): ExistsTypeAnnotation;
export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation;

@ -364,7 +364,7 @@ declare function nullLiteral(): NullLiteral;
declare function booleanLiteral(value: boolean): BooleanLiteral; declare function booleanLiteral(value: boolean): BooleanLiteral;
declare function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; declare function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
declare function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; declare function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
declare function memberExpression(object: Expression | Super, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression; declare function memberExpression(object: Expression | Super, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: boolean | null): MemberExpression;
declare function newExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>): NewExpression; declare function newExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>): NewExpression;
declare function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; declare function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
declare function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression; declare function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
@ -441,8 +441,8 @@ declare function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareMo
declare function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; declare function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias;
declare function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; declare function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType;
declare function declareVariable(id: Identifier): DeclareVariable; declare function declareVariable(id: Identifier): DeclareVariable;
declare function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration; declare function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null, attributes?: Array<ImportAttribute> | null): DeclareExportDeclaration;
declare function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; declare function declareExportAllDeclaration(source: StringLiteral, attributes?: Array<ImportAttribute> | null): DeclareExportAllDeclaration;
declare function declaredPredicate(value: Flow): DeclaredPredicate; declare function declaredPredicate(value: Flow): DeclaredPredicate;
declare function existsTypeAnnotation(): ExistsTypeAnnotation; declare function existsTypeAnnotation(): ExistsTypeAnnotation;
declare function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; declare function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation;
@ -1106,7 +1106,7 @@ declare function isVar(node: Node): boolean;
*/ */
declare function matchesPattern(member: Node | null | undefined, match: string | string[], allowPartial?: boolean): boolean; declare function matchesPattern(member: Node | null | undefined, match: string | string[], allowPartial?: boolean): boolean;
declare function validate(node: Node | undefined | null, key: string, val: any): void; declare function validate(node: Node | undefined | null, key: string, val: unknown): void;
/** /**
* Build a function that when called will return whether or not the * Build a function that when called will return whether or not the
@ -1519,7 +1519,7 @@ interface CallExpression extends BaseNode {
type: "CallExpression"; type: "CallExpression";
callee: Expression | Super | V8IntrinsicIdentifier; callee: Expression | Super | V8IntrinsicIdentifier;
arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>; arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>;
optional?: true | false | null; optional?: boolean | null;
typeArguments?: TypeParameterInstantiation | null; typeArguments?: TypeParameterInstantiation | null;
typeParameters?: TSTypeParameterInstantiation | null; typeParameters?: TSTypeParameterInstantiation | null;
} }
@ -1659,13 +1659,13 @@ interface MemberExpression extends BaseNode {
object: Expression | Super; object: Expression | Super;
property: Expression | Identifier | PrivateName; property: Expression | Identifier | PrivateName;
computed: boolean; computed: boolean;
optional?: true | false | null; optional?: boolean | null;
} }
interface NewExpression extends BaseNode { interface NewExpression extends BaseNode {
type: "NewExpression"; type: "NewExpression";
callee: Expression | Super | V8IntrinsicIdentifier; callee: Expression | Super | V8IntrinsicIdentifier;
arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>; arguments: Array<Expression | SpreadElement | ArgumentPlaceholder>;
optional?: true | false | null; optional?: boolean | null;
typeArguments?: TypeParameterInstantiation | null; typeArguments?: TypeParameterInstantiation | null;
typeParameters?: TSTypeParameterInstantiation | null; typeParameters?: TSTypeParameterInstantiation | null;
} }
@ -1844,6 +1844,7 @@ interface ClassDeclaration extends BaseNode {
interface ExportAllDeclaration extends BaseNode { interface ExportAllDeclaration extends BaseNode {
type: "ExportAllDeclaration"; type: "ExportAllDeclaration";
source: StringLiteral; source: StringLiteral;
/** @deprecated */
assertions?: Array<ImportAttribute> | null; assertions?: Array<ImportAttribute> | null;
attributes?: Array<ImportAttribute> | null; attributes?: Array<ImportAttribute> | null;
exportKind?: "type" | "value" | null; exportKind?: "type" | "value" | null;
@ -1858,6 +1859,7 @@ interface ExportNamedDeclaration extends BaseNode {
declaration?: Declaration | null; declaration?: Declaration | null;
specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>; specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>;
source?: StringLiteral | null; source?: StringLiteral | null;
/** @deprecated */
assertions?: Array<ImportAttribute> | null; assertions?: Array<ImportAttribute> | null;
attributes?: Array<ImportAttribute> | null; attributes?: Array<ImportAttribute> | null;
exportKind?: "type" | "value" | null; exportKind?: "type" | "value" | null;
@ -1879,6 +1881,7 @@ interface ImportDeclaration extends BaseNode {
type: "ImportDeclaration"; type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>; specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
source: StringLiteral; source: StringLiteral;
/** @deprecated */
assertions?: Array<ImportAttribute> | null; assertions?: Array<ImportAttribute> | null;
attributes?: Array<ImportAttribute> | null; attributes?: Array<ImportAttribute> | null;
importKind?: "type" | "typeof" | "value" | null; importKind?: "type" | "typeof" | "value" | null;
@ -2151,11 +2154,17 @@ interface DeclareExportDeclaration extends BaseNode {
declaration?: Flow | null; declaration?: Flow | null;
specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null; specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null;
source?: StringLiteral | null; source?: StringLiteral | null;
attributes?: Array<ImportAttribute> | null;
/** @deprecated */
assertions?: Array<ImportAttribute> | null;
default?: boolean | null; default?: boolean | null;
} }
interface DeclareExportAllDeclaration extends BaseNode { interface DeclareExportAllDeclaration extends BaseNode {
type: "DeclareExportAllDeclaration"; type: "DeclareExportAllDeclaration";
source: StringLiteral; source: StringLiteral;
attributes?: Array<ImportAttribute> | null;
/** @deprecated */
assertions?: Array<ImportAttribute> | null;
exportKind?: "type" | "value" | null; exportKind?: "type" | "value" | null;
} }
interface DeclaredPredicate extends BaseNode { interface DeclaredPredicate extends BaseNode {
@ -2477,6 +2486,9 @@ interface Placeholder extends BaseNode {
type: "Placeholder"; type: "Placeholder";
expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
name: Identifier; name: Identifier;
decorators?: Array<Decorator> | null;
optional?: boolean | null;
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
} }
interface V8IntrinsicIdentifier extends BaseNode { interface V8IntrinsicIdentifier extends BaseNode {
type: "V8IntrinsicIdentifier"; type: "V8IntrinsicIdentifier";
@ -2822,6 +2834,7 @@ interface TSModuleDeclaration extends BaseNode {
body: TSModuleBlock | TSModuleDeclaration; body: TSModuleBlock | TSModuleDeclaration;
declare?: boolean | null; declare?: boolean | null;
global?: boolean | null; global?: boolean | null;
kind: "global" | "module" | "namespace";
} }
interface TSModuleBlock extends BaseNode { interface TSModuleBlock extends BaseNode {
type: "TSModuleBlock"; type: "TSModuleBlock";
@ -3027,7 +3040,7 @@ interface ParentMaps {
DeclareTypeAlias: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; DeclareTypeAlias: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
DeclareVariable: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; DeclareVariable: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
DeclaredPredicate: ArrowFunctionExpression | DeclareExportDeclaration | DeclareFunction | DeclaredPredicate | FunctionDeclaration | FunctionExpression; DeclaredPredicate: ArrowFunctionExpression | DeclareExportDeclaration | DeclareFunction | DeclaredPredicate | FunctionDeclaration | FunctionExpression;
Decorator: ArrayPattern | AssignmentPattern | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | Identifier | ObjectMethod | ObjectPattern | ObjectProperty | RestElement | TSDeclareMethod | TSParameterProperty; Decorator: ArrayPattern | AssignmentPattern | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | Identifier | ObjectMethod | ObjectPattern | ObjectProperty | Placeholder | RestElement | TSDeclareMethod | TSParameterProperty;
Directive: BlockStatement | Program; Directive: BlockStatement | Program;
DirectiveLiteral: Directive; DirectiveLiteral: Directive;
DoExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; DoExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
@ -3063,7 +3076,7 @@ interface ParentMaps {
Identifier: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | BreakStatement | CallExpression | CatchClause | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | ContinueStatement | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | Decorator | DoWhileStatement | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumNumberMember | EnumStringMember | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamespaceSpecifier | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeParam | GenericTypeAnnotation | IfStatement | ImportAttribute | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | InterfaceDeclaration | InterfaceExtends | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LabeledStatement | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectMethod | ObjectProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | Placeholder | PrivateName | QualifiedTypeIdentifier | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSInstantiationExpression | TSInterfaceDeclaration | TSMethodSignature | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNonNullExpression | TSParameterProperty | TSPropertySignature | TSQualifiedName | TSSatisfiesExpression | TSTypeAliasDeclaration | TSTypeAssertion | TSTypePredicate | TSTypeQuery | TSTypeReference | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeAlias | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; Identifier: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | BreakStatement | CallExpression | CatchClause | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | ContinueStatement | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | Decorator | DoWhileStatement | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumNumberMember | EnumStringMember | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamespaceSpecifier | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeParam | GenericTypeAnnotation | IfStatement | ImportAttribute | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | InterfaceDeclaration | InterfaceExtends | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LabeledStatement | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectMethod | ObjectProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | Placeholder | PrivateName | QualifiedTypeIdentifier | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSInstantiationExpression | TSInterfaceDeclaration | TSMethodSignature | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNonNullExpression | TSParameterProperty | TSPropertySignature | TSQualifiedName | TSSatisfiesExpression | TSTypeAliasDeclaration | TSTypeAssertion | TSTypePredicate | TSTypeQuery | TSTypeReference | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeAlias | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
IfStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; IfStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
Import: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; Import: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
ImportAttribute: ExportAllDeclaration | ExportNamedDeclaration | ImportDeclaration; ImportAttribute: DeclareExportAllDeclaration | DeclareExportDeclaration | ExportAllDeclaration | ExportNamedDeclaration | ImportDeclaration;
ImportDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; ImportDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
ImportDefaultSpecifier: ImportDeclaration; ImportDefaultSpecifier: ImportDeclaration;
ImportExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ImportExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
@ -3098,7 +3111,7 @@ interface ParentMaps {
MixedTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; MixedTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation;
ModuleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ModuleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
NewExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; NewExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
Noop: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TSDeclareFunction | TSDeclareMethod; Noop: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | Placeholder | RestElement | TSDeclareFunction | TSDeclareMethod;
NullLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; NullLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
NullLiteralTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NullLiteralTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation;
NullableTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NullableTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation;
@ -3196,7 +3209,7 @@ interface ParentMaps {
TSThisType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSTypePredicate | TSUnionType | TemplateLiteral; TSThisType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSTypePredicate | TSUnionType | TemplateLiteral;
TSTupleType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTupleType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral;
TSTypeAliasDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSTypeAliasDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
TSTypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSIndexSignature | TSMethodSignature | TSPropertySignature | TSTypePredicate; TSTypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | Placeholder | RestElement | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSIndexSignature | TSMethodSignature | TSPropertySignature | TSTypePredicate;
TSTypeAssertion: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSTypeAssertion: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
TSTypeLiteral: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeLiteral: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral;
TSTypeOperator: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeOperator: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral;
@ -3221,7 +3234,7 @@ interface ParentMaps {
TupleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TupleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
TupleTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; TupleTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation;
TypeAlias: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TypeAlias: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement;
TypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | DeclareExportDeclaration | DeclareModuleExports | DeclaredPredicate | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TypeCastExpression | TypeParameter; TypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | DeclareExportDeclaration | DeclareModuleExports | DeclaredPredicate | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | Placeholder | RestElement | TypeCastExpression | TypeParameter;
TypeCastExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | DeclareExportDeclaration | DeclaredPredicate | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TypeCastExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | DeclareExportDeclaration | DeclaredPredicate | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSImportType | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
TypeParameter: DeclareExportDeclaration | DeclaredPredicate | TypeParameterDeclaration; TypeParameter: DeclareExportDeclaration | DeclaredPredicate | TypeParameterDeclaration;
TypeParameterDeclaration: ArrowFunctionExpression | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | DeclareClass | DeclareExportDeclaration | DeclareInterface | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | InterfaceDeclaration | ObjectMethod | OpaqueType | TypeAlias; TypeParameterDeclaration: ArrowFunctionExpression | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | DeclareClass | DeclareExportDeclaration | DeclareInterface | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | InterfaceDeclaration | ObjectMethod | OpaqueType | TypeAlias;

@ -588,5 +588,8 @@ const react = exports.react = {
{ {
exports.toSequenceExpression = require("./converters/toSequenceExpression.js").default; exports.toSequenceExpression = require("./converters/toSequenceExpression.js").default;
} }
if (process.env.BABEL_TYPES_8_BREAKING) {
console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!");
}
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map

@ -87,7 +87,7 @@ declare class BabelNodeCallExpression extends BabelNode {
type: "CallExpression"; type: "CallExpression";
callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier; callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier;
arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>; arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>;
optional?: true | false; optional?: boolean;
typeArguments?: BabelNodeTypeParameterInstantiation; typeArguments?: BabelNodeTypeParameterInstantiation;
typeParameters?: BabelNodeTSTypeParameterInstantiation; typeParameters?: BabelNodeTSTypeParameterInstantiation;
} }
@ -234,14 +234,14 @@ declare class BabelNodeMemberExpression extends BabelNode {
object: BabelNodeExpression | BabelNodeSuper; object: BabelNodeExpression | BabelNodeSuper;
property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName; property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName;
computed?: boolean; computed?: boolean;
optional?: true | false; optional?: boolean;
} }
declare class BabelNodeNewExpression extends BabelNode { declare class BabelNodeNewExpression extends BabelNode {
type: "NewExpression"; type: "NewExpression";
callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier; callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier;
arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>; arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>;
optional?: true | false; optional?: boolean;
typeArguments?: BabelNodeTypeParameterInstantiation; typeArguments?: BabelNodeTypeParameterInstantiation;
typeParameters?: BabelNodeTSTypeParameterInstantiation; typeParameters?: BabelNodeTSTypeParameterInstantiation;
} }
@ -767,11 +767,15 @@ declare class BabelNodeDeclareExportDeclaration extends BabelNode {
declaration?: BabelNodeFlow; declaration?: BabelNodeFlow;
specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>; specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>;
source?: BabelNodeStringLiteral; source?: BabelNodeStringLiteral;
attributes?: Array<BabelNodeImportAttribute>;
assertions?: Array<BabelNodeImportAttribute>;
} }
declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { declare class BabelNodeDeclareExportAllDeclaration extends BabelNode {
type: "DeclareExportAllDeclaration"; type: "DeclareExportAllDeclaration";
source: BabelNodeStringLiteral; source: BabelNodeStringLiteral;
attributes?: Array<BabelNodeImportAttribute>;
assertions?: Array<BabelNodeImportAttribute>;
exportKind?: "type" | "value"; exportKind?: "type" | "value";
} }
@ -1151,6 +1155,9 @@ declare class BabelNodePlaceholder extends BabelNode {
type: "Placeholder"; type: "Placeholder";
expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
name: BabelNodeIdentifier; name: BabelNodeIdentifier;
decorators?: Array<BabelNodeDecorator>;
optional?: boolean;
typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
} }
declare class BabelNodeV8IntrinsicIdentifier extends BabelNode { declare class BabelNodeV8IntrinsicIdentifier extends BabelNode {
@ -1561,6 +1568,7 @@ declare class BabelNodeTSModuleDeclaration extends BabelNode {
body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration;
declare?: boolean; declare?: boolean;
global?: boolean; global?: boolean;
kind: "global" | "module" | "namespace";
} }
declare class BabelNodeTSModuleBlock extends BabelNode { declare class BabelNodeTSModuleBlock extends BabelNode {
@ -1708,7 +1716,7 @@ declare module "@babel/types" {
declare export function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; declare export function booleanLiteral(value: boolean): BabelNodeBooleanLiteral;
declare export function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; declare export function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral;
declare export function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; declare export function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression;
declare export function memberExpression(object: BabelNodeExpression | BabelNodeSuper, property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; declare export function memberExpression(object: BabelNodeExpression | BabelNodeSuper, property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName, computed?: boolean, optional?: boolean): BabelNodeMemberExpression;
declare export function newExpression(callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression; declare export function newExpression(callee: BabelNodeExpression | BabelNodeSuper | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression;
declare export function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram; declare export function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram;
declare export function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression; declare export function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression;
@ -1782,8 +1790,8 @@ declare module "@babel/types" {
declare export function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; declare export function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias;
declare export function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; declare export function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType;
declare export function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; declare export function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable;
declare export function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration; declare export function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral, attributes?: Array<BabelNodeImportAttribute>): BabelNodeDeclareExportDeclaration;
declare export function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration; declare export function declareExportAllDeclaration(source: BabelNodeStringLiteral, attributes?: Array<BabelNodeImportAttribute>): BabelNodeDeclareExportAllDeclaration;
declare export function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; declare export function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate;
declare export function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; declare export function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation;
declare export function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; declare export function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation;

File diff suppressed because one or more lines are too long

@ -17,7 +17,7 @@ function is(type, node, opts) {
} }
return false; return false;
} }
if (typeof opts === "undefined") { if (opts === undefined) {
return true; return true;
} else { } else {
return (0, _shallowEqual.default)(node, opts); return (0, _shallowEqual.default)(node, opts);

@ -1 +1 @@
{"version":3,"names":["_shallowEqual","require","_isType","_isPlaceholderType","_index","is","type","node","opts","matches","isType","FLIPPED_ALIAS_KEYS","isPlaceholderType","expectedNode","shallowEqual"],"sources":["../../src/validators/is.ts"],"sourcesContent":["import shallowEqual from \"../utils/shallowEqual.ts\";\nimport isType from \"./isType.ts\";\nimport isPlaceholderType from \"./isPlaceholderType.ts\";\nimport { FLIPPED_ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function is<T extends t.Node[\"type\"]>(\n type: T,\n node: t.Node | null | undefined,\n opts?: undefined,\n): node is Extract<t.Node, { type: T }>;\n\nexport default function is<\n T extends t.Node[\"type\"],\n P extends Extract<t.Node, { type: T }>,\n>(type: T, n: t.Node | null | undefined, required: Partial<P>): n is P;\n\nexport default function is<P extends t.Node>(\n type: string,\n node: t.Node | null | undefined,\n opts: Partial<P>,\n): node is P;\n\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node;\n/**\n * Returns whether `node` is of given `type`.\n *\n * For better performance, use this instead of `is[Type]` when `type` is unknown.\n */\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node {\n if (!node) return false;\n\n const matches = isType(node.type, type);\n if (!matches) {\n if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS) {\n // We can only return true if the placeholder doesn't replace a real node,\n // but it replaces a category of nodes (an alias).\n //\n // t.is(\"Identifier\", node) gives some guarantees about node's shape, so we\n // can't say that Placeholder(expectedNode: \"Identifier\") is an identifier\n // because it doesn't have the same properties.\n // On the other hand, t.is(\"Expression\", node) doesn't say anything about\n // the shape of node because Expression can be many different nodes: we can,\n // and should, safely report expression placeholders as Expressions.\n return isPlaceholderType(node.expectedNode, type);\n }\n return false;\n }\n\n if (typeof opts === \"undefined\") {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AA8Be,SAASI,EAAEA,CACxBC,IAAY,EACZC,IAA+B,EAC/BC,IAAsB,EACN;EAChB,IAAI,CAACD,IAAI,EAAE,OAAO,KAAK;EAEvB,MAAME,OAAO,GAAG,IAAAC,eAAM,EAACH,IAAI,CAACD,IAAI,EAAEA,IAAI,CAAC;EACvC,IAAI,CAACG,OAAO,EAAE;IACZ,IAAI,CAACD,IAAI,IAAID,IAAI,CAACD,IAAI,KAAK,aAAa,IAAIA,IAAI,IAAIK,yBAAkB,EAAE;MAUtE,OAAO,IAAAC,0BAAiB,EAACL,IAAI,CAACM,YAAY,EAAEP,IAAI,CAAC;IACnD;IACA,OAAO,KAAK;EACd;EAEA,IAAI,OAAOE,IAAI,KAAK,WAAW,EAAE;IAC/B,OAAO,IAAI;EACb,CAAC,MAAM;IACL,OAAO,IAAAM,qBAAY,EAACP,IAAI,EAAEC,IAAI,CAAC;EACjC;AACF","ignoreList":[]} {"version":3,"names":["_shallowEqual","require","_isType","_isPlaceholderType","_index","is","type","node","opts","matches","isType","FLIPPED_ALIAS_KEYS","isPlaceholderType","expectedNode","undefined","shallowEqual"],"sources":["../../src/validators/is.ts"],"sourcesContent":["import shallowEqual from \"../utils/shallowEqual.ts\";\nimport isType from \"./isType.ts\";\nimport isPlaceholderType from \"./isPlaceholderType.ts\";\nimport { FLIPPED_ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function is<T extends t.Node[\"type\"]>(\n type: T,\n node: t.Node | null | undefined,\n opts?: undefined,\n): node is Extract<t.Node, { type: T }>;\n\nexport default function is<\n T extends t.Node[\"type\"],\n P extends Extract<t.Node, { type: T }>,\n>(type: T, n: t.Node | null | undefined, required: Partial<P>): n is P;\n\nexport default function is<P extends t.Node>(\n type: string,\n node: t.Node | null | undefined,\n opts: Partial<P>,\n): node is P;\n\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node;\n/**\n * Returns whether `node` is of given `type`.\n *\n * For better performance, use this instead of `is[Type]` when `type` is unknown.\n */\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node {\n if (!node) return false;\n\n const matches = isType(node.type, type);\n if (!matches) {\n if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS) {\n // We can only return true if the placeholder doesn't replace a real node,\n // but it replaces a category of nodes (an alias).\n //\n // t.is(\"Identifier\", node) gives some guarantees about node's shape, so we\n // can't say that Placeholder(expectedNode: \"Identifier\") is an identifier\n // because it doesn't have the same properties.\n // On the other hand, t.is(\"Expression\", node) doesn't say anything about\n // the shape of node because Expression can be many different nodes: we can,\n // and should, safely report expression placeholders as Expressions.\n return isPlaceholderType(node.expectedNode, type);\n }\n return false;\n }\n\n if (opts === undefined) {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AA8Be,SAASI,EAAEA,CACxBC,IAAY,EACZC,IAA+B,EAC/BC,IAAsB,EACN;EAChB,IAAI,CAACD,IAAI,EAAE,OAAO,KAAK;EAEvB,MAAME,OAAO,GAAG,IAAAC,eAAM,EAACH,IAAI,CAACD,IAAI,EAAEA,IAAI,CAAC;EACvC,IAAI,CAACG,OAAO,EAAE;IACZ,IAAI,CAACD,IAAI,IAAID,IAAI,CAACD,IAAI,KAAK,aAAa,IAAIA,IAAI,IAAIK,yBAAkB,EAAE;MAUtE,OAAO,IAAAC,0BAAiB,EAACL,IAAI,CAACM,YAAY,EAAEP,IAAI,CAAC;IACnD;IACA,OAAO,KAAK;EACd;EAEA,IAAIE,IAAI,KAAKM,SAAS,EAAE;IACtB,OAAO,IAAI;EACb,CAAC,MAAM;IACL,OAAO,IAAAC,qBAAY,EAACR,IAAI,EAAEC,IAAI,CAAC;EACjC;AACF","ignoreList":[]}

@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports.default = validate; exports.default = validate;
exports.validateChild = validateChild; exports.validateChild = validateChild;
exports.validateField = validateField; exports.validateField = validateField;
exports.validateInternal = validateInternal;
var _index = require("../definitions/index.js"); var _index = require("../definitions/index.js");
function validate(node, key, val) { function validate(node, key, val) {
if (!node) return; if (!node) return;
@ -15,16 +16,27 @@ function validate(node, key, val) {
validateField(node, key, val, field); validateField(node, key, val, field);
validateChild(node, key, val); validateChild(node, key, val);
} }
function validateInternal(field, node, key, val, maybeNode) {
if (!(field != null && field.validate)) return;
if (field.optional && val == null) return;
field.validate(node, key, val);
if (maybeNode) {
var _NODE_PARENT_VALIDATI;
const type = val.type;
if (type == null) return;
(_NODE_PARENT_VALIDATI = _index.NODE_PARENT_VALIDATIONS[type]) == null || _NODE_PARENT_VALIDATI.call(_index.NODE_PARENT_VALIDATIONS, node, key, val);
}
}
function validateField(node, key, val, field) { function validateField(node, key, val, field) {
if (!(field != null && field.validate)) return; if (!(field != null && field.validate)) return;
if (field.optional && val == null) return; if (field.optional && val == null) return;
field.validate(node, key, val); field.validate(node, key, val);
} }
function validateChild(node, key, val) { function validateChild(node, key, val) {
if (val == null) return; var _NODE_PARENT_VALIDATI2;
const validate = _index.NODE_PARENT_VALIDATIONS[val.type]; const type = val == null ? void 0 : val.type;
if (!validate) return; if (type == null) return;
validate(node, key, val); (_NODE_PARENT_VALIDATI2 = _index.NODE_PARENT_VALIDATIONS[type]) == null || _NODE_PARENT_VALIDATI2.call(_index.NODE_PARENT_VALIDATIONS, node, key, val);
} }
//# sourceMappingURL=validate.js.map //# sourceMappingURL=validate.js.map

@ -1 +1 @@
{"version":3,"names":["_index","require","validate","node","key","val","fields","NODE_FIELDS","type","field","validateField","validateChild","optional","NODE_PARENT_VALIDATIONS"],"sources":["../../src/validators/validate.ts"],"sourcesContent":["import {\n NODE_FIELDS,\n NODE_PARENT_VALIDATIONS,\n type FieldOptions,\n} from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function validate(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n): void {\n if (!node) return;\n\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n const field = fields[key];\n validateField(node, key, val, field);\n validateChild(node, key, val);\n}\n\nexport function validateField(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n field: FieldOptions | undefined | null,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n}\n\nexport function validateChild(\n node: t.Node | undefined | null,\n key: string,\n val?: t.Node | undefined | null,\n) {\n if (val == null) return;\n const validate = NODE_PARENT_VALIDATIONS[val.type];\n if (!validate) return;\n validate(node, key, val);\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOe,SAASC,QAAQA,CAC9BC,IAA+B,EAC/BC,GAAW,EACXC,GAAQ,EACF;EACN,IAAI,CAACF,IAAI,EAAE;EAEX,MAAMG,MAAM,GAAGC,kBAAW,CAACJ,IAAI,CAACK,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAEb,MAAMG,KAAK,GAAGH,MAAM,CAACF,GAAG,CAAC;EACzBM,aAAa,CAACP,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAEI,KAAK,CAAC;EACpCE,aAAa,CAACR,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAC/B;AAEO,SAASK,aAAaA,CAC3BP,IAA+B,EAC/BC,GAAW,EACXC,GAAQ,EACRI,KAAsC,EAChC;EACN,IAAI,EAACA,KAAK,YAALA,KAAK,CAAEP,QAAQ,GAAE;EACtB,IAAIO,KAAK,CAACG,QAAQ,IAAIP,GAAG,IAAI,IAAI,EAAE;EAEnCI,KAAK,CAACP,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAChC;AAEO,SAASM,aAAaA,CAC3BR,IAA+B,EAC/BC,GAAW,EACXC,GAA+B,EAC/B;EACA,IAAIA,GAAG,IAAI,IAAI,EAAE;EACjB,MAAMH,QAAQ,GAAGW,8BAAuB,CAACR,GAAG,CAACG,IAAI,CAAC;EAClD,IAAI,CAACN,QAAQ,EAAE;EACfA,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAC1B","ignoreList":[]} {"version":3,"names":["_index","require","validate","node","key","val","fields","NODE_FIELDS","type","field","validateField","validateChild","validateInternal","maybeNode","optional","_NODE_PARENT_VALIDATI","NODE_PARENT_VALIDATIONS","call","_NODE_PARENT_VALIDATI2"],"sources":["../../src/validators/validate.ts"],"sourcesContent":["import {\n NODE_FIELDS,\n NODE_PARENT_VALIDATIONS,\n type FieldOptions,\n} from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function validate(\n node: t.Node | undefined | null,\n key: string,\n val: unknown,\n): void {\n if (!node) return;\n\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n const field = fields[key];\n validateField(node, key, val, field);\n validateChild(node, key, val);\n}\n\nexport function validateInternal(\n field: FieldOptions,\n node: t.Node | undefined | null,\n key: string,\n val: unknown,\n maybeNode?: 1,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n\n if (maybeNode) {\n const type = (val as t.Node).type;\n if (type == null) return;\n NODE_PARENT_VALIDATIONS[type]?.(node, key, val);\n }\n}\n\nexport function validateField(\n node: t.Node | undefined | null,\n key: string,\n val: unknown,\n field: FieldOptions | undefined | null,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n}\n\nexport function validateChild(\n node: t.Node | undefined | null,\n key: string,\n val?: unknown,\n) {\n const type = (val as t.Node)?.type;\n if (type == null) return;\n NODE_PARENT_VALIDATIONS[type]?.(node, key, val);\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOe,SAASC,QAAQA,CAC9BC,IAA+B,EAC/BC,GAAW,EACXC,GAAY,EACN;EACN,IAAI,CAACF,IAAI,EAAE;EAEX,MAAMG,MAAM,GAAGC,kBAAW,CAACJ,IAAI,CAACK,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAEb,MAAMG,KAAK,GAAGH,MAAM,CAACF,GAAG,CAAC;EACzBM,aAAa,CAACP,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAEI,KAAK,CAAC;EACpCE,aAAa,CAACR,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAC/B;AAEO,SAASO,gBAAgBA,CAC9BH,KAAmB,EACnBN,IAA+B,EAC/BC,GAAW,EACXC,GAAY,EACZQ,SAAa,EACP;EACN,IAAI,EAACJ,KAAK,YAALA,KAAK,CAAEP,QAAQ,GAAE;EACtB,IAAIO,KAAK,CAACK,QAAQ,IAAIT,GAAG,IAAI,IAAI,EAAE;EAEnCI,KAAK,CAACP,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;EAE9B,IAAIQ,SAAS,EAAE;IAAA,IAAAE,qBAAA;IACb,MAAMP,IAAI,GAAIH,GAAG,CAAYG,IAAI;IACjC,IAAIA,IAAI,IAAI,IAAI,EAAE;IAClB,CAAAO,qBAAA,GAAAC,8BAAuB,CAACR,IAAI,CAAC,aAA7BO,qBAAA,CAAAE,IAAA,CAAAD,8BAAuB,EAASb,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;EACjD;AACF;AAEO,SAASK,aAAaA,CAC3BP,IAA+B,EAC/BC,GAAW,EACXC,GAAY,EACZI,KAAsC,EAChC;EACN,IAAI,EAACA,KAAK,YAALA,KAAK,CAAEP,QAAQ,GAAE;EACtB,IAAIO,KAAK,CAACK,QAAQ,IAAIT,GAAG,IAAI,IAAI,EAAE;EAEnCI,KAAK,CAACP,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAChC;AAEO,SAASM,aAAaA,CAC3BR,IAA+B,EAC/BC,GAAW,EACXC,GAAa,EACb;EAAA,IAAAa,sBAAA;EACA,MAAMV,IAAI,GAAIH,GAAG,oBAAHA,GAAG,CAAaG,IAAI;EAClC,IAAIA,IAAI,IAAI,IAAI,EAAE;EAClB,CAAAU,sBAAA,GAAAF,8BAAuB,CAACR,IAAI,CAAC,aAA7BU,sBAAA,CAAAD,IAAA,CAAAD,8BAAuB,EAASb,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AACjD","ignoreList":[]}

@ -1,6 +1,6 @@
{ {
"name": "@babel/types", "name": "@babel/types",
"version": "7.25.4", "version": "7.26.0",
"description": "Babel Types is a Lodash-esque utility library for AST nodes", "description": "Babel Types is a Lodash-esque utility library for AST nodes",
"author": "The Babel Team (https://babel.dev/team)", "author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-types", "homepage": "https://babel.dev/docs/en/next/babel-types",
@ -24,13 +24,12 @@
} }
}, },
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.24.8", "@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.24.7", "@babel/helper-validator-identifier": "^7.25.9"
"to-fast-properties": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/generator": "^7.25.4", "@babel/generator": "^7.26.0",
"@babel/parser": "^7.25.4", "@babel/parser": "^7.26.0",
"glob": "^7.2.0" "glob": "^7.2.0"
}, },
"engines": { "engines": {

@ -1,20 +0,0 @@
/* This file is automatically generated by scripts/generators/tsconfig.js */
{
"extends": [
"../../tsconfig.base.json",
"../../tsconfig.paths.json"
],
"include": [
"../../packages/babel-types/src/**/*.ts",
"../../lib/globals.d.ts",
"../../scripts/repo-utils/*.d.ts"
],
"references": [
{
"path": "../../packages/babel-helper-string-parser"
},
{
"path": "../../packages/babel-helper-validator-identifier"
}
]
}

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{ {
"name": "@rollup/rollup-win32-x64-msvc", "name": "@rollup/rollup-win32-x64-msvc",
"version": "4.21.1", "version": "4.26.0",
"os": [ "os": [
"win32" "win32"
], ],

@ -8,7 +8,7 @@ This package contains type definitions for estree (https://github.com/estree/est
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
### Additional Details ### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT * Last updated: Wed, 18 Sep 2024 09:37:00 GMT
* Dependencies: none * Dependencies: none
# Credits # Credits

@ -353,7 +353,7 @@ export interface UnaryExpression extends BaseExpression {
export interface BinaryExpression extends BaseExpression { export interface BinaryExpression extends BaseExpression {
type: "BinaryExpression"; type: "BinaryExpression";
operator: BinaryOperator; operator: BinaryOperator;
left: Expression; left: Expression | PrivateIdentifier;
right: Expression; right: Expression;
} }
@ -638,7 +638,7 @@ export interface ImportDeclaration extends BaseModuleDeclaration {
export interface ImportSpecifier extends BaseModuleSpecifier { export interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier"; type: "ImportSpecifier";
imported: Identifier; imported: Identifier | Literal;
} }
export interface ImportExpression extends BaseExpression { export interface ImportExpression extends BaseExpression {
@ -661,9 +661,10 @@ export interface ExportNamedDeclaration extends BaseModuleDeclaration {
source?: Literal | null | undefined; source?: Literal | null | undefined;
} }
export interface ExportSpecifier extends BaseModuleSpecifier { export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
type: "ExportSpecifier"; type: "ExportSpecifier";
exported: Identifier; local: Identifier | Literal;
exported: Identifier | Literal;
} }
export interface ExportDefaultDeclaration extends BaseModuleDeclaration { export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
@ -673,7 +674,7 @@ export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
export interface ExportAllDeclaration extends BaseModuleDeclaration { export interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration"; type: "ExportAllDeclaration";
exported: Identifier | null; exported: Identifier | Literal | null;
source: Literal; source: Literal;
} }

@ -1,6 +1,6 @@
{ {
"name": "@types/estree", "name": "@types/estree",
"version": "1.0.5", "version": "1.0.6",
"description": "TypeScript definitions for estree", "description": "TypeScript definitions for estree",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
"license": "MIT", "license": "MIT",
@ -20,7 +20,7 @@
}, },
"scripts": {}, "scripts": {},
"dependencies": {}, "dependencies": {},
"typesPublisherContentHash": "6f0eeaffe488ce594e73f8df619c677d752a279b51edbc744e4aebb20db4b3a7", "typesPublisherContentHash": "0310b41994a6f8d7530af6c53d47d8b227f32925e43718507fdb1178e05006b1",
"typeScriptVersion": "4.5", "typeScriptVersion": "4.8",
"nonNpm": true "nonNpm": true
} }

@ -58,6 +58,23 @@ export interface Options {
* - **default:** `false` * - **default:** `false`
*/ */
prodHydrationMismatchDetails?: boolean prodHydrationMismatchDetails?: boolean
/**
* Customize the component ID generation strategy.
* - `'filepath'`: hash the file path (relative to the project root)
* - `'filepath-source'`: hash the file path and the source code
* - `function`: custom function that takes the file path, source code,
* whether in production mode, and the default hash function as arguments
* - **default:** `'filepath'` in development, `'filepath-source'` in production
*/
componentIdGenerator?:
| 'filepath'
| 'filepath-source'
| ((
filepath: string,
source: string,
isProduction: boolean | undefined,
getHash: (text: string) => string,
) => string)
} }
// `script`, `template` and `style` are lower-level compiler options // `script`, `template` and `style` are lower-level compiler options

@ -1,6 +1,6 @@
{ {
"name": "@vitejs/plugin-vue", "name": "@vitejs/plugin-vue",
"version": "5.1.2", "version": "5.2.0",
"type": "commonjs", "type": "commonjs",
"license": "MIT", "license": "MIT",
"author": "Evan You", "author": "Evan You",
@ -35,12 +35,12 @@
"devDependencies": { "devDependencies": {
"@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25", "@jridgewell/trace-mapping": "^0.3.25",
"debug": "^4.3.5", "debug": "^4.3.7",
"rollup": "^4.19.2", "rollup": "^4.25.0",
"slash": "^5.1.0", "slash": "^5.1.0",
"source-map-js": "^1.2.0", "source-map-js": "^1.2.1",
"vite": "^5.3.5", "vite": "^6.0.0-beta.9",
"vue": "^3.4.29" "vue": "^3.5.12"
}, },
"scripts": { "scripts": {
"dev": "unbuild --stub", "dev": "unbuild --stub",

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-core", "name": "@vue/compiler-core",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/compiler-core", "description": "@vue/compiler-core",
"main": "index.js", "main": "index.js",
"module": "dist/compiler-core.esm-bundler.js", "module": "dist/compiler-core.esm-bundler.js",
@ -46,13 +46,13 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
"dependencies": { "dependencies": {
"@babel/parser": "^7.24.7", "@babel/parser": "^7.25.3",
"entities": "^4.5.0", "entities": "^4.5.0",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"source-map-js": "^1.2.0", "source-map-js": "^1.2.0",
"@vue/shared": "3.4.38" "@vue/shared": "3.5.12"
}, },
"devDependencies": { "devDependencies": {
"@babel/types": "^7.24.7" "@babel/types": "^7.25.2"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-dom", "name": "@vue/compiler-dom",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/compiler-dom", "description": "@vue/compiler-dom",
"main": "index.js", "main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js", "module": "dist/compiler-dom.esm-bundler.js",
@ -51,7 +51,7 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
"dependencies": { "dependencies": {
"@vue/shared": "3.4.38", "@vue/shared": "3.5.12",
"@vue/compiler-core": "3.4.38" "@vue/compiler-core": "3.5.12"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-sfc", "name": "@vue/compiler-sfc",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/compiler-sfc", "description": "@vue/compiler-sfc",
"main": "dist/compiler-sfc.cjs.js", "main": "dist/compiler-sfc.cjs.js",
"module": "dist/compiler-sfc.esm-browser.js", "module": "dist/compiler-sfc.esm-browser.js",
@ -42,26 +42,26 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
"dependencies": { "dependencies": {
"@babel/parser": "^7.24.7", "@babel/parser": "^7.25.3",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"magic-string": "^0.30.10", "magic-string": "^0.30.11",
"postcss": "^8.4.40", "postcss": "^8.4.47",
"source-map-js": "^1.2.0", "source-map-js": "^1.2.0",
"@vue/compiler-core": "3.4.38", "@vue/compiler-core": "3.5.12",
"@vue/compiler-dom": "3.4.38", "@vue/compiler-ssr": "3.5.12",
"@vue/compiler-ssr": "3.4.38", "@vue/shared": "3.5.12",
"@vue/shared": "3.4.38" "@vue/compiler-dom": "3.5.12"
}, },
"devDependencies": { "devDependencies": {
"@babel/types": "^7.24.7", "@babel/types": "^7.25.2",
"@vue/consolidate": "^1.0.0", "@vue/consolidate": "^1.0.0",
"hash-sum": "^2.0.0", "hash-sum": "^2.0.0",
"lru-cache": "10.1.0", "lru-cache": "10.1.0",
"merge-source-map": "^1.1.0", "merge-source-map": "^1.1.0",
"minimatch": "~9.0.5", "minimatch": "~9.0.5",
"postcss-modules": "^6.0.0", "postcss-modules": "^6.0.0",
"postcss-selector-parser": "^6.1.1", "postcss-selector-parser": "^6.1.2",
"pug": "^3.0.3", "pug": "^3.0.3",
"sass": "^1.77.8" "sass": "^1.79.4"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-ssr", "name": "@vue/compiler-ssr",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/compiler-ssr", "description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js", "main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts", "types": "dist/compiler-ssr.d.ts",
@ -28,7 +28,7 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
"dependencies": { "dependencies": {
"@vue/shared": "3.4.38", "@vue/shared": "3.5.12",
"@vue/compiler-dom": "3.4.38" "@vue/compiler-dom": "3.5.12"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/reactivity", "name": "@vue/reactivity",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/reactivity", "description": "@vue/reactivity",
"main": "index.js", "main": "index.js",
"module": "dist/reactivity.esm-bundler.js", "module": "dist/reactivity.esm-bundler.js",
@ -50,6 +50,6 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
"dependencies": { "dependencies": {
"@vue/shared": "3.4.38" "@vue/shared": "3.5.12"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/runtime-core", "name": "@vue/runtime-core",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/runtime-core", "description": "@vue/runtime-core",
"main": "index.js", "main": "index.js",
"module": "dist/runtime-core.esm-bundler.js", "module": "dist/runtime-core.esm-bundler.js",
@ -46,7 +46,7 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
"dependencies": { "dependencies": {
"@vue/shared": "3.4.38", "@vue/shared": "3.5.12",
"@vue/reactivity": "3.4.38" "@vue/reactivity": "3.5.12"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/runtime-dom", "name": "@vue/runtime-dom",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/runtime-dom", "description": "@vue/runtime-dom",
"main": "index.js", "main": "index.js",
"module": "dist/runtime-dom.esm-bundler.js", "module": "dist/runtime-dom.esm-bundler.js",
@ -50,8 +50,11 @@
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme",
"dependencies": { "dependencies": {
"csstype": "^3.1.3", "csstype": "^3.1.3",
"@vue/shared": "3.4.38", "@vue/shared": "3.5.12",
"@vue/reactivity": "3.4.38", "@vue/runtime-core": "3.5.12",
"@vue/runtime-core": "3.4.38" "@vue/reactivity": "3.5.12"
},
"devDependencies": {
"@types/trusted-types": "^2.0.7"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/server-renderer", "name": "@vue/server-renderer",
"version": "3.4.38", "version": "3.5.12",
"description": "@vue/server-renderer", "description": "@vue/server-renderer",
"main": "index.js", "main": "index.js",
"module": "dist/server-renderer.esm-bundler.js", "module": "dist/server-renderer.esm-bundler.js",
@ -46,10 +46,10 @@
}, },
"homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme", "homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme",
"peerDependencies": { "peerDependencies": {
"vue": "3.4.38" "vue": "3.5.12"
}, },
"dependencies": { "dependencies": {
"@vue/shared": "3.4.38", "@vue/compiler-ssr": "3.5.12",
"@vue/compiler-ssr": "3.4.38" "@vue/shared": "3.5.12"
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "@vue/shared", "name": "@vue/shared",
"version": "3.4.38", "version": "3.5.12",
"description": "internal utils shared across @vue packages", "description": "internal utils shared across @vue packages",
"main": "index.js", "main": "index.js",
"module": "dist/shared.esm-bundler.js", "module": "dist/shared.esm-bundler.js",

@ -1,6 +1,6 @@
{ {
"name": "magic-string", "name": "magic-string",
"version": "0.30.11", "version": "0.30.12",
"packageManager": "pnpm@9.6.0", "packageManager": "pnpm@9.6.0",
"description": "Modify strings, generate sourcemaps", "description": "Modify strings, generate sourcemaps",
"keywords": [ "keywords": [

@ -1,6 +1,6 @@
ISC License ISC License
Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above

@ -1,6 +1,6 @@
{ {
"name": "picocolors", "name": "picocolors",
"version": "1.0.1", "version": "1.1.1",
"main": "./picocolors.js", "main": "./picocolors.js",
"types": "./picocolors.d.ts", "types": "./picocolors.d.ts",
"browser": { "browser": {
@ -10,7 +10,7 @@
"description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
"files": [ "files": [
"picocolors.*", "picocolors.*",
"types.ts" "types.d.ts"
], ],
"keywords": [ "keywords": [
"terminal", "terminal",

@ -1,4 +1,4 @@
var x=String; var x=String;
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}}; var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
module.exports=create(); module.exports=create();
module.exports.createColors = create; module.exports.createColors = create;

@ -1,26 +1,16 @@
let argv = process.argv || [], let p = process || {}, argv = p.argv || [], env = p.env || {}
env = process.env
let isColorSupported = let isColorSupported =
!("NO_COLOR" in env || argv.includes("--no-color")) && !(!!env.NO_COLOR || argv.includes("--no-color")) &&
("FORCE_COLOR" in env || (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
argv.includes("--color") ||
process.platform === "win32" ||
(require != null && require("tty").isatty(1) && env.TERM !== "dumb") ||
"CI" in env)
let formatter = let formatter = (open, close, replace = open) =>
(open, close, replace = open) =>
input => { input => {
let string = "" + input let string = "" + input, index = string.indexOf(close, open.length)
let index = string.indexOf(close, open.length) return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
return ~index
? open + replaceClose(string, close, replace, index) + close
: open + string + close
} }
let replaceClose = (string, close, replace, index) => { let replaceClose = (string, close, replace, index) => {
let result = "" let result = "", cursor = 0
let cursor = 0
do { do {
result += string.substring(cursor, index) + replace result += string.substring(cursor, index) + replace
cursor = index + close.length cursor = index + close.length
@ -30,34 +20,54 @@ let replaceClose = (string, close, replace, index) => {
} }
let createColors = (enabled = isColorSupported) => { let createColors = (enabled = isColorSupported) => {
let init = enabled ? formatter : () => String let f = enabled ? formatter : () => String
return { return {
isColorSupported: enabled, isColorSupported: enabled,
reset: init("\x1b[0m", "\x1b[0m"), reset: f("\x1b[0m", "\x1b[0m"),
bold: init("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
dim: init("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
italic: init("\x1b[3m", "\x1b[23m"), italic: f("\x1b[3m", "\x1b[23m"),
underline: init("\x1b[4m", "\x1b[24m"), underline: f("\x1b[4m", "\x1b[24m"),
inverse: init("\x1b[7m", "\x1b[27m"), inverse: f("\x1b[7m", "\x1b[27m"),
hidden: init("\x1b[8m", "\x1b[28m"), hidden: f("\x1b[8m", "\x1b[28m"),
strikethrough: init("\x1b[9m", "\x1b[29m"), strikethrough: f("\x1b[9m", "\x1b[29m"),
black: init("\x1b[30m", "\x1b[39m"),
red: init("\x1b[31m", "\x1b[39m"), black: f("\x1b[30m", "\x1b[39m"),
green: init("\x1b[32m", "\x1b[39m"), red: f("\x1b[31m", "\x1b[39m"),
yellow: init("\x1b[33m", "\x1b[39m"), green: f("\x1b[32m", "\x1b[39m"),
blue: init("\x1b[34m", "\x1b[39m"), yellow: f("\x1b[33m", "\x1b[39m"),
magenta: init("\x1b[35m", "\x1b[39m"), blue: f("\x1b[34m", "\x1b[39m"),
cyan: init("\x1b[36m", "\x1b[39m"), magenta: f("\x1b[35m", "\x1b[39m"),
white: init("\x1b[37m", "\x1b[39m"), cyan: f("\x1b[36m", "\x1b[39m"),
gray: init("\x1b[90m", "\x1b[39m"), white: f("\x1b[37m", "\x1b[39m"),
bgBlack: init("\x1b[40m", "\x1b[49m"), gray: f("\x1b[90m", "\x1b[39m"),
bgRed: init("\x1b[41m", "\x1b[49m"),
bgGreen: init("\x1b[42m", "\x1b[49m"), bgBlack: f("\x1b[40m", "\x1b[49m"),
bgYellow: init("\x1b[43m", "\x1b[49m"), bgRed: f("\x1b[41m", "\x1b[49m"),
bgBlue: init("\x1b[44m", "\x1b[49m"), bgGreen: f("\x1b[42m", "\x1b[49m"),
bgMagenta: init("\x1b[45m", "\x1b[49m"), bgYellow: f("\x1b[43m", "\x1b[49m"),
bgCyan: init("\x1b[46m", "\x1b[49m"), bgBlue: f("\x1b[44m", "\x1b[49m"),
bgWhite: init("\x1b[47m", "\x1b[49m"), bgMagenta: f("\x1b[45m", "\x1b[49m"),
bgCyan: f("\x1b[46m", "\x1b[49m"),
bgWhite: f("\x1b[47m", "\x1b[49m"),
blackBright: f("\x1b[90m", "\x1b[39m"),
redBright: f("\x1b[91m", "\x1b[39m"),
greenBright: f("\x1b[92m", "\x1b[39m"),
yellowBright: f("\x1b[93m", "\x1b[39m"),
blueBright: f("\x1b[94m", "\x1b[39m"),
magentaBright: f("\x1b[95m", "\x1b[39m"),
cyanBright: f("\x1b[96m", "\x1b[39m"),
whiteBright: f("\x1b[97m", "\x1b[39m"),
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
bgRedBright: f("\x1b[101m", "\x1b[49m"),
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
} }
} }

@ -1,30 +0,0 @@
export type Formatter = (input: string | number | null | undefined) => string
export interface Colors {
isColorSupported: boolean
reset: Formatter
bold: Formatter
dim: Formatter
italic: Formatter
underline: Formatter
inverse: Formatter
hidden: Formatter
strikethrough: Formatter
black: Formatter
red: Formatter
green: Formatter
yellow: Formatter
blue: Formatter
magenta: Formatter
cyan: Formatter
white: Formatter
gray: Formatter
bgBlack: Formatter
bgRed: Formatter
bgGreen: Formatter
bgYellow: Formatter
bgBlue: Formatter
bgMagenta: Formatter
bgCyan: Formatter
bgWhite: Formatter
}

@ -20,13 +20,26 @@ declare namespace Container {
/** /**
* An array of property names. * An array of property names.
*/ */
props?: string[] props?: readonly string[]
} }
export interface ContainerProps extends NodeProps { export interface ContainerProps extends NodeProps {
nodes?: (Node | ChildProps)[] nodes?: readonly (ChildProps | Node)[]
} }
/**
* All types that can be passed into container methods to create or add a new
* child node.
*/
export type NewChild =
| ChildProps
| Node
| readonly ChildProps[]
| readonly Node[]
| readonly string[]
| string
| undefined
// eslint-disable-next-line @typescript-eslint/no-use-before-define // eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Container_ as default } export { Container_ as default }
} }
@ -51,6 +64,26 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
*/ */
nodes: Child[] | undefined nodes: Child[] | undefined
/**
* An internal method that converts a {@link NewChild} into a list of actual
* child nodes that can then be added to this container.
*
* This ensures that the nodes' parent is set to this container, that they use
* the correct prototype chain, and that they're marked as dirty.
*
* @param mnodes The new node or nodes to add.
* @param sample A node from whose raws the new node's `before` raw should be
* taken.
* @param type This should be set to `'prepend'` if the new nodes will be
* inserted at the beginning of the container.
* @hidden
*/
protected normalize(
nodes: Container.NewChild,
sample: Node | undefined,
type?: 'prepend' | false
): Child[]
/** /**
* Inserts new nodes to the end of the container. * Inserts new nodes to the end of the container.
* *
@ -71,21 +104,11 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @param nodes New nodes. * @param nodes New nodes.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
append( append(...nodes: Container.NewChild[]): this
...nodes: (
| ChildProps
| ChildProps[]
| Node
| Node[]
| string
| string[]
| undefined
)[]
): this
assign(overrides: Container.ContainerProps | object): this assign(overrides: Container.ContainerProps | object): this
clone(overrides?: Partial<Container.ContainerProps>): this clone(overrides?: Partial<Container.ContainerProps>): this
cloneAfter(overrides?: Partial<Container.ContainerProps>): this cloneAfter(overrides?: Partial<Container.ContainerProps>): this
cloneBefore(overrides?: Partial<Container.ContainerProps>): this cloneBefore(overrides?: Partial<Container.ContainerProps>): this
/** /**
@ -124,7 +147,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
each( each(
callback: (node: Child, index: number) => false | void callback: (node: Child, index: number) => false | void
): false | undefined ): false | undefined
/** /**
* Returns `true` if callback returns `true` * Returns `true` if callback returns `true`
* for all of the containers children. * for all of the containers children.
@ -139,6 +161,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
every( every(
condition: (node: Child, index: number, nodes: Child[]) => boolean condition: (node: Child, index: number, nodes: Child[]) => boolean
): boolean ): boolean
/** /**
* Returns a `child`s index within the `Container#nodes` array. * Returns a `child`s index within the `Container#nodes` array.
* *
@ -150,7 +173,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @return Child index. * @return Child index.
*/ */
index(child: Child | number): number index(child: Child | number): number
/** /**
* Insert new node after old node within the container. * Insert new node after old node within the container.
* *
@ -158,17 +180,8 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @param newNode New node. * @param newNode New node.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
insertAfter( insertAfter(oldNode: Child | number, newNode: Container.NewChild): this
oldNode: Child | number,
newNode:
| Node
| Node[]
| ChildProps
| ChildProps[]
| string
| string[]
| undefined
): this
/** /**
* Insert new node before old node within the container. * Insert new node before old node within the container.
* *
@ -180,17 +193,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @param newNode New node. * @param newNode New node.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
insertBefore( insertBefore(oldNode: Child | number, newNode: Container.NewChild): this
oldNode: Child | number,
newNode:
| Node
| Node[]
| ChildProps
| ChildProps[]
| string
| string[]
| undefined
): this
/** /**
* Traverses the containers descendant nodes, calling callback * Traverses the containers descendant nodes, calling callback
@ -229,17 +232,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @param nodes New nodes. * @param nodes New nodes.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
prepend( prepend(...nodes: Container.NewChild[]): this
...nodes: (
| ChildProps
| ChildProps[]
| Node
| Node[]
| string
| string[]
| undefined
)[]
): this
/** /**
* Add child to the end of the node. * Add child to the end of the node.
* *
@ -301,8 +294,8 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* ``` * ```
* *
* @param pattern Replace pattern. * @param pattern Replace pattern.
* @param {object} opts Options to speed up the search. * @param {object} options Options to speed up the search.
* @param callback String to replace pattern or callback * @param replaced String to replace pattern or callback
* that returns a new value. The callback * that returns a new value. The callback
* will receive the same arguments * will receive the same arguments
* as those passed to a function parameter * as those passed to a function parameter

@ -1,11 +1,11 @@
'use strict' 'use strict'
let { isClean, my } = require('./symbols')
let Declaration = require('./declaration')
let Comment = require('./comment') let Comment = require('./comment')
let Declaration = require('./declaration')
let Node = require('./node') let Node = require('./node')
let { isClean, my } = require('./symbols')
let parse, Rule, AtRule, Root let AtRule, parse, Root, Rule
function cleanSource(nodes) { function cleanSource(nodes) {
return nodes.map(i => { return nodes.map(i => {
@ -214,6 +214,8 @@ class Container extends Node {
i = i.proxyOf i = i.proxyOf
if (i.parent) i.parent.removeChild(i) if (i.parent) i.parent.removeChild(i)
if (i[isClean]) markTreeDirty(i) if (i[isClean]) markTreeDirty(i)
if (!i.raws) i.raws = {}
if (typeof i.raws.before === 'undefined') { if (typeof i.raws.before === 'undefined') {
if (sample && typeof sample.raws.before !== 'undefined') { if (sample && typeof sample.raws.before !== 'undefined') {
i.raws.before = sample.raws.before.replace(/\S/g, '') i.raws.before = sample.raws.before.replace(/\S/g, '')

@ -52,37 +52,70 @@ class CssSyntaxError extends Error {
let css = this.source let css = this.source
if (color == null) color = pico.isColorSupported if (color == null) color = pico.isColorSupported
let aside = text => text
let mark = text => text
let highlight = text => text
if (color) {
let { bold, gray, red } = pico.createColors(true)
mark = text => bold(red(text))
aside = text => gray(text)
if (terminalHighlight) { if (terminalHighlight) {
if (color) css = terminalHighlight(css) highlight = text => terminalHighlight(text)
}
} }
let lines = css.split(/\r?\n/) let lines = css.split(/\r?\n/)
let start = Math.max(this.line - 3, 0) let start = Math.max(this.line - 3, 0)
let end = Math.min(this.line + 2, lines.length) let end = Math.min(this.line + 2, lines.length)
let maxWidth = String(end).length let maxWidth = String(end).length
let mark, aside
if (color) {
let { bold, gray, red } = pico.createColors(true)
mark = text => bold(red(text))
aside = text => gray(text)
} else {
mark = aside = str => str
}
return lines return lines
.slice(start, end) .slice(start, end)
.map((line, index) => { .map((line, index) => {
let number = start + 1 + index let number = start + 1 + index
let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '
if (number === this.line) { if (number === this.line) {
if (line.length > 160) {
let padding = 20
let subLineStart = Math.max(0, this.column - padding)
let subLineEnd = Math.max(
this.column + padding,
this.endColumn + padding
)
let subLine = line.slice(subLineStart, subLineEnd)
let spacing =
aside(gutter.replace(/\d/g, ' ')) +
line
.slice(0, Math.min(this.column - 1, padding - 1))
.replace(/[^\t]/g, ' ')
return (
mark('>') +
aside(gutter) +
highlight(subLine) +
'\n ' +
spacing +
mark('^')
)
}
let spacing = let spacing =
aside(gutter.replace(/\d/g, ' ')) + aside(gutter.replace(/\d/g, ' ')) +
line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') line.slice(0, this.column - 1).replace(/[^\t]/g, ' ')
return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^')
return (
mark('>') +
aside(gutter) +
highlight(line) +
'\n ' +
spacing +
mark('^')
)
} }
return ' ' + aside(gutter) + line
return ' ' + aside(gutter) + highlight(line)
}) })
.join('\n') .join('\n')
} }

@ -5,7 +5,7 @@ import Root from './root.js'
declare namespace Document { declare namespace Document {
export interface DocumentProps extends ContainerProps { export interface DocumentProps extends ContainerProps {
nodes?: Root[] nodes?: readonly Root[]
/** /**
* Information to generate byte-to-byte equal node string as it was * Information to generate byte-to-byte equal node string as it was

@ -1,10 +1,10 @@
'use strict' 'use strict'
let Declaration = require('./declaration')
let PreviousMap = require('./previous-map')
let Comment = require('./comment')
let AtRule = require('./at-rule') let AtRule = require('./at-rule')
let Comment = require('./comment')
let Declaration = require('./declaration')
let Input = require('./input') let Input = require('./input')
let PreviousMap = require('./previous-map')
let Root = require('./root') let Root = require('./root')
let Rule = require('./rule') let Rule = require('./rule')

@ -174,6 +174,9 @@ declare class Input_ {
endLine?: number, endLine?: number,
endColumn?: number endColumn?: number
): false | Input.FilePosition ): false | Input.FilePosition
/** Converts this to a JSON-friendly object representation. */
toJSON(): object
/** /**
* The CSS source identifier. Contains `Input#file` if the user * The CSS source identifier. Contains `Input#file` if the user
* set the `from` option, or `Input#id` if they did not. * set the `from` option, or `Input#id` if they did not.
@ -187,9 +190,6 @@ declare class Input_ {
* ``` * ```
*/ */
get from(): string get from(): string
/** Converts this to a JSON-friendly object representation. */
toJSON(): object
} }
declare class Input extends Input_ {} declare class Input extends Input_ {}

@ -1,13 +1,13 @@
'use strict' 'use strict'
let { nanoid } = require('nanoid/non-secure')
let { isAbsolute, resolve } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { fileURLToPath, pathToFileURL } = require('url') let { fileURLToPath, pathToFileURL } = require('url')
let { isAbsolute, resolve } = require('path')
let { nanoid } = require('nanoid/non-secure')
let terminalHighlight = require('./terminal-highlight')
let CssSyntaxError = require('./css-syntax-error') let CssSyntaxError = require('./css-syntax-error')
let PreviousMap = require('./previous-map') let PreviousMap = require('./previous-map')
let terminalHighlight = require('./terminal-highlight')
let fromOffsetCache = Symbol('fromOffsetCache') let fromOffsetCache = Symbol('fromOffsetCache')
@ -61,7 +61,7 @@ class Input {
} }
error(message, line, column, opts = {}) { error(message, line, column, opts = {}) {
let result, endLine, endColumn let endColumn, endLine, result
if (line && typeof line === 'object') { if (line && typeof line === 'object') {
let start = line let start = line

@ -1,14 +1,14 @@
'use strict' 'use strict'
let { isClean, my } = require('./symbols')
let MapGenerator = require('./map-generator')
let stringify = require('./stringify')
let Container = require('./container') let Container = require('./container')
let Document = require('./document') let Document = require('./document')
let warnOnce = require('./warn-once') let MapGenerator = require('./map-generator')
let Result = require('./result')
let parse = require('./parse') let parse = require('./parse')
let Result = require('./result')
let Root = require('./root') let Root = require('./root')
let stringify = require('./stringify')
let { isClean, my } = require('./symbols')
let warnOnce = require('./warn-once')
const TYPE_TO_CLASS_NAME = { const TYPE_TO_CLASS_NAME = {
atrule: 'AtRule', atrule: 'AtRule',

@ -47,7 +47,11 @@ declare namespace list {
* @param last boolean indicator. * @param last boolean indicator.
* @return Split values. * @return Split values.
*/ */
split(string: string, separators: string[], last: boolean): string[] split(
string: string,
separators: readonly string[],
last: boolean
): string[]
} }
} }

@ -1,7 +1,7 @@
'use strict' 'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { dirname, relative, resolve, sep } = require('path') let { dirname, relative, resolve, sep } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { pathToFileURL } = require('url') let { pathToFileURL } = require('url')
let Input = require('./input') let Input = require('./input')
@ -70,7 +70,7 @@ class MapGenerator {
for (let i = this.root.nodes.length - 1; i >= 0; i--) { for (let i = this.root.nodes.length - 1; i >= 0; i--) {
node = this.root.nodes[i] node = this.root.nodes[i]
if (node.type !== 'comment') continue if (node.type !== 'comment') continue
if (node.text.indexOf('# sourceMappingURL=') === 0) { if (node.text.startsWith('# sourceMappingURL=')) {
this.root.removeChild(i) this.root.removeChild(i)
} }
} }
@ -143,7 +143,7 @@ class MapGenerator {
source: '' source: ''
} }
let lines, last let last, lines
this.stringify(this.root, (str, node, type) => { this.stringify(this.root, (str, node, type) => {
this.css += str this.css += str

@ -1,10 +1,10 @@
'use strict' 'use strict'
let MapGenerator = require('./map-generator') let MapGenerator = require('./map-generator')
let stringify = require('./stringify')
let warnOnce = require('./warn-once')
let parse = require('./parse') let parse = require('./parse')
const Result = require('./result') const Result = require('./result')
let stringify = require('./stringify')
let warnOnce = require('./warn-once')
class NoWorkResult { class NoWorkResult {
constructor(processor, css, opts) { constructor(processor, css, opts) {

@ -2,7 +2,7 @@ import AtRule = require('./at-rule.js')
import { AtRuleProps } from './at-rule.js' import { AtRuleProps } from './at-rule.js'
import Comment, { CommentProps } from './comment.js' import Comment, { CommentProps } from './comment.js'
import Container from './container.js' import Container, { NewChild } from './container.js'
import CssSyntaxError from './css-syntax-error.js' import CssSyntaxError from './css-syntax-error.js'
import Declaration, { DeclarationProps } from './declaration.js' import Declaration, { DeclarationProps } from './declaration.js'
import Document from './document.js' import Document from './document.js'
@ -234,6 +234,14 @@ declare abstract class Node_ {
constructor(defaults?: object) constructor(defaults?: object)
/**
* If this node isn't already dirty, marks it and its ancestors as such. This
* indicates to the LazyResult processor that the {@link Root} has been
* modified by the current plugin and may need to be processed again by other
* plugins.
*/
protected markDirty(): void
/** /**
* Insert new node after current node to current nodes parent. * Insert new node after current node to current nodes parent.
* *
@ -246,7 +254,9 @@ declare abstract class Node_ {
* @param newNode New node. * @param newNode New node.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
after(newNode: Node | Node.ChildProps | Node[] | string | undefined): this after(
newNode: Node | Node.ChildProps | readonly Node[] | string | undefined
): this
/** /**
* It assigns properties to an existing node instance. * It assigns properties to an existing node instance.
@ -273,7 +283,9 @@ declare abstract class Node_ {
* @param newNode New node. * @param newNode New node.
* @return This node for methods chain. * @return This node for methods chain.
*/ */
before(newNode: Node | Node.ChildProps | Node[] | string | undefined): this before(
newNode: Node | Node.ChildProps | readonly Node[] | string | undefined
): this
/** /**
* Clear the code style properties for the node and its children. * Clear the code style properties for the node and its children.
@ -470,14 +482,7 @@ declare abstract class Node_ {
* @param nodes Mode(s) to replace current one. * @param nodes Mode(s) to replace current one.
* @return Current node to methods chain. * @return Current node to methods chain.
*/ */
replaceWith( replaceWith(...nodes: NewChild[]): this
...nodes: (
| Node
| Node[]
| Node.ChildProps
| Node.ChildProps[]
)[]
): this
/** /**
* Finds the Root instance of the nodes tree. * Finds the Root instance of the nodes tree.

@ -1,9 +1,9 @@
'use strict' 'use strict'
let { isClean, my } = require('./symbols')
let CssSyntaxError = require('./css-syntax-error') let CssSyntaxError = require('./css-syntax-error')
let Stringifier = require('./stringifier') let Stringifier = require('./stringifier')
let stringify = require('./stringify') let stringify = require('./stringify')
let { isClean, my } = require('./symbols')
function cloneNode(obj, parent) { function cloneNode(obj, parent) {
let cloned = new obj.constructor() let cloned = new obj.constructor()
@ -32,6 +32,36 @@ function cloneNode(obj, parent) {
return cloned return cloned
} }
function sourceOffset(inputCSS, position) {
// Not all custom syntaxes support `offset` in `source.start` and `source.end`
if (
position &&
typeof position.offset !== 'undefined'
) {
return position.offset;
}
let column = 1
let line = 1
let offset = 0
for (let i = 0; i < inputCSS.length; i++) {
if (line === position.line && column === position.column) {
offset = i
break
}
if (inputCSS[i] === '\n') {
column = 1
line += 1
} else {
column += 1
}
}
return offset
}
class Node { class Node {
constructor(defaults = {}) { constructor(defaults = {}) {
this.raws = {} this.raws = {}
@ -153,6 +183,11 @@ class Node {
} }
} }
/* c8 ignore next 3 */
markClean() {
this[isClean] = true
}
markDirty() { markDirty() {
if (this[isClean]) { if (this[isClean]) {
this[isClean] = false this[isClean] = false
@ -169,25 +204,29 @@ class Node {
return this.parent.nodes[index + 1] return this.parent.nodes[index + 1]
} }
positionBy(opts, stringRepresentation) { positionBy(opts) {
let pos = this.source.start let pos = this.source.start
if (opts.index) { if (opts.index) {
pos = this.positionInside(opts.index, stringRepresentation) pos = this.positionInside(opts.index)
} else if (opts.word) { } else if (opts.word) {
stringRepresentation = this.toString() let stringRepresentation = this.source.input.css.slice(
sourceOffset(this.source.input.css, this.source.start),
sourceOffset(this.source.input.css, this.source.end)
)
let index = stringRepresentation.indexOf(opts.word) let index = stringRepresentation.indexOf(opts.word)
if (index !== -1) pos = this.positionInside(index, stringRepresentation) if (index !== -1) pos = this.positionInside(index)
} }
return pos return pos
} }
positionInside(index, stringRepresentation) { positionInside(index) {
let string = stringRepresentation || this.toString()
let column = this.source.start.column let column = this.source.start.column
let line = this.source.start.line let line = this.source.start.line
let offset = sourceOffset(this.source.input.css, this.source.start)
let end = offset + index
for (let i = 0; i < index; i++) { for (let i = offset; i < end; i++) {
if (string[i] === '\n') { if (this.source.input.css[i] === '\n') {
column = 1 column = 1
line += 1 line += 1
} else { } else {
@ -220,11 +259,16 @@ class Node {
} }
if (opts.word) { if (opts.word) {
let stringRepresentation = this.toString() let stringRepresentation = this.source.input.css.slice(
sourceOffset(this.source.input.css, this.source.start),
sourceOffset(this.source.input.css, this.source.end)
)
let index = stringRepresentation.indexOf(opts.word) let index = stringRepresentation.indexOf(opts.word)
if (index !== -1) { if (index !== -1) {
start = this.positionInside(index, stringRepresentation) start = this.positionInside(index)
end = this.positionInside(index + opts.word.length, stringRepresentation) end = this.positionInside(
index + opts.word.length,
)
} }
} else { } else {
if (opts.start) { if (opts.start) {

@ -1,8 +1,8 @@
'use strict' 'use strict'
let Container = require('./container') let Container = require('./container')
let Parser = require('./parser')
let Input = require('./input') let Input = require('./input')
let Parser = require('./parser')
function parse(css, opts) { function parse(css, opts) {
let input = new Input(css, opts) let input = new Input(css, opts)

@ -1,11 +1,11 @@
'use strict' 'use strict'
let Declaration = require('./declaration')
let tokenizer = require('./tokenize')
let Comment = require('./comment')
let AtRule = require('./at-rule') let AtRule = require('./at-rule')
let Comment = require('./comment')
let Declaration = require('./declaration')
let Root = require('./root') let Root = require('./root')
let Rule = require('./rule') let Rule = require('./rule')
let tokenizer = require('./tokenize')
const SAFE_COMMENT_NEIGHBOR = { const SAFE_COMMENT_NEIGHBOR = {
empty: true, empty: true,
@ -143,7 +143,7 @@ class Parser {
colon(tokens) { colon(tokens) {
let brackets = 0 let brackets = 0
let token, type, prev let prev, token, type
for (let [i, element] of tokens.entries()) { for (let [i, element] of tokens.entries()) {
token = element token = element
type = token[0] type = token[0]
@ -267,12 +267,12 @@ class Parser {
let str = '' let str = ''
for (let j = i; j > 0; j--) { for (let j = i; j > 0; j--) {
let type = cache[j][0] let type = cache[j][0]
if (str.trim().indexOf('!') === 0 && type !== 'space') { if (str.trim().startsWith('!') && type !== 'space') {
break break
} }
str = cache.pop()[1] + str str = cache.pop()[1] + str
} }
if (str.trim().indexOf('!') === 0) { if (str.trim().startsWith('!')) {
node.important = true node.important = true
node.raws.important = str node.raws.important = str
tokens = cache tokens = cache

@ -2,7 +2,7 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'
import AtRule, { AtRuleProps } from './at-rule.js' import AtRule, { AtRuleProps } from './at-rule.js'
import Comment, { CommentProps } from './comment.js' import Comment, { CommentProps } from './comment.js'
import Container, { ContainerProps } from './container.js' import Container, { ContainerProps, NewChild } from './container.js'
import CssSyntaxError from './css-syntax-error.js' import CssSyntaxError from './css-syntax-error.js'
import Declaration, { DeclarationProps } from './declaration.js' import Declaration, { DeclarationProps } from './declaration.js'
import Document, { DocumentProps } from './document.js' import Document, { DocumentProps } from './document.js'
@ -170,6 +170,7 @@ declare namespace postcss {
LazyResult, LazyResult,
list, list,
Message, Message,
NewChild,
Node, Node,
NodeErrorOptions, NodeErrorOptions,
NodeProps, NodeProps,
@ -444,7 +445,9 @@ declare namespace postcss {
* @param plugins PostCSS plugins. * @param plugins PostCSS plugins.
* @return Processor to process multiple CSS. * @return Processor to process multiple CSS.
*/ */
declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor declare function postcss(
plugins?: readonly postcss.AcceptedPlugin[]
): Processor
declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
export = postcss export = postcss

@ -1,23 +1,23 @@
'use strict' 'use strict'
let AtRule = require('./at-rule')
let Comment = require('./comment')
let Container = require('./container')
let CssSyntaxError = require('./css-syntax-error') let CssSyntaxError = require('./css-syntax-error')
let Declaration = require('./declaration') let Declaration = require('./declaration')
let LazyResult = require('./lazy-result')
let Container = require('./container')
let Processor = require('./processor')
let stringify = require('./stringify')
let fromJSON = require('./fromJSON')
let Document = require('./document') let Document = require('./document')
let Warning = require('./warning') let fromJSON = require('./fromJSON')
let Comment = require('./comment')
let AtRule = require('./at-rule')
let Result = require('./result.js')
let Input = require('./input') let Input = require('./input')
let parse = require('./parse') let LazyResult = require('./lazy-result')
let list = require('./list') let list = require('./list')
let Rule = require('./rule')
let Root = require('./root')
let Node = require('./node') let Node = require('./node')
let parse = require('./parse')
let Processor = require('./processor')
let Result = require('./result.js')
let Root = require('./root')
let Rule = require('./rule')
let stringify = require('./stringify')
let Warning = require('./warning')
function postcss(...plugins) { function postcss(...plugins) {
if (plugins.length === 1 && Array.isArray(plugins[0])) { if (plugins.length === 1 && Array.isArray(plugins[0])) {

@ -1,8 +1,8 @@
'use strict' 'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { existsSync, readFileSync } = require('fs') let { existsSync, readFileSync } = require('fs')
let { dirname, join } = require('path') let { dirname, join } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
function fromBase64(str) { function fromBase64(str) {
if (Buffer) { if (Buffer) {

@ -51,7 +51,7 @@ declare class Processor_ {
/** /**
* @param plugins PostCSS plugins * @param plugins PostCSS plugins
*/ */
constructor(plugins?: AcceptedPlugin[]) constructor(plugins?: readonly AcceptedPlugin[])
/** /**
* Parses source CSS and returns a `LazyResult` Promise proxy. * Parses source CSS and returns a `LazyResult` Promise proxy.

@ -1,13 +1,13 @@
'use strict' 'use strict'
let NoWorkResult = require('./no-work-result')
let LazyResult = require('./lazy-result')
let Document = require('./document') let Document = require('./document')
let LazyResult = require('./lazy-result')
let NoWorkResult = require('./no-work-result')
let Root = require('./root') let Root = require('./root')
class Processor { class Processor {
constructor(plugins = []) { constructor(plugins = []) {
this.version = '8.4.41' this.version = '8.4.49'
this.plugins = this.normalize(plugins) this.plugins = this.normalize(plugins)
} }

@ -76,7 +76,7 @@ declare class Root_ extends Container {
* const result = root1.toResult({ to: 'all.css', map: true }) * const result = root1.toResult({ to: 'all.css', map: true })
* ``` * ```
* *
* @param opts Options. * @param options Options.
* @return Result with current roots CSS. * @return Result with current roots CSS.
*/ */
toResult(options?: ProcessOptions): Result toResult(options?: ProcessOptions): Result

@ -40,7 +40,7 @@ declare namespace Rule {
semicolon?: boolean semicolon?: boolean
} }
export type RuleProps = ContainerProps & { export type RuleProps = {
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */ /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: RuleRaws raws?: RuleRaws
} & ( } & (
@ -50,11 +50,11 @@ declare namespace Rule {
selectors?: never selectors?: never
} }
| { | {
/** Selectors of the rule represented as an array of strings. */
selectors: string[]
selector?: never selector?: never
/** Selectors of the rule represented as an array of strings. */
selectors: readonly string[]
} }
) ) & ContainerProps
// eslint-disable-next-line @typescript-eslint/no-use-before-define // eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Rule_ as default } export { Rule_ as default }

@ -29,8 +29,8 @@ module.exports = function tokenizer(input, options = {}) {
let css = input.css.valueOf() let css = input.css.valueOf()
let ignore = options.ignoreErrors let ignore = options.ignoreErrors
let code, next, quote, content, escape let code, content, escape, next, quote
let escaped, escapePos, prev, n, currentToken let currentToken, escaped, escapePos, n, prev
let length = css.length let length = css.length
let pos = 0 let pos = 0

@ -1,6 +1,6 @@
{ {
"name": "postcss", "name": "postcss",
"version": "8.4.41", "version": "8.4.49",
"description": "Tool for transforming styles with JS plugins", "description": "Tool for transforming styles with JS plugins",
"engines": { "engines": {
"node": "^10 || ^12 || >=14" "node": "^10 || ^12 || >=14"
@ -75,8 +75,8 @@
}, },
"dependencies": { "dependencies": {
"nanoid": "^3.3.7", "nanoid": "^3.3.7",
"picocolors": "^1.0.1", "picocolors": "^1.1.1",
"source-map-js": "^1.2.0" "source-map-js": "^1.2.1"
}, },
"browser": { "browser": {
"./lib/terminal-highlight": false, "./lib/terminal-highlight": false,

@ -13,7 +13,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
# Licenses of bundled dependencies # Licenses of bundled dependencies
The published Rollup artifact additionally contains code with the following licenses: The published Rollup artifact additionally contains code with the following licenses:
MIT, ISC MIT, ISC, 0BSD
# Bundled dependencies: # Bundled dependencies:
## @jridgewell/sourcemap-codec ## @jridgewell/sourcemap-codec
@ -632,6 +632,26 @@ Repository: micromatch/to-regex-range
--------------------------------------- ---------------------------------------
## tslib
License: 0BSD
By: Microsoft Corp.
Repository: https://github.com/Microsoft/tslib.git
> Copyright (c) Microsoft Corporation.
>
> Permission to use, copy, modify, and/or distribute this software for any
> purpose with or without fee is hereby granted.
>
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
> AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
> LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
> OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
> PERFORMANCE OF THIS SOFTWARE.
---------------------------------------
## yargs-parser ## yargs-parser
License: ISC License: ISC
By: Ben Coe By: Ben Coe

@ -1,6 +1,6 @@
{ {
"name": "rollup", "name": "rollup",
"version": "4.21.1", "version": "4.26.0",
"description": "Next-generation ES module bundler", "description": "Next-generation ES module bundler",
"main": "dist/rollup.js", "main": "dist/rollup.js",
"module": "dist/es/rollup.js", "module": "dist/es/rollup.js",
@ -19,6 +19,7 @@
"aarch64-apple-darwin", "aarch64-apple-darwin",
"aarch64-linux-android", "aarch64-linux-android",
"aarch64-pc-windows-msvc", "aarch64-pc-windows-msvc",
"aarch64-unknown-freebsd",
"aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl", "aarch64-unknown-linux-musl",
"armv7-linux-androideabi", "armv7-linux-androideabi",
@ -30,6 +31,7 @@
"s390x-unknown-linux-gnu", "s390x-unknown-linux-gnu",
"x86_64-apple-darwin", "x86_64-apple-darwin",
"x86_64-pc-windows-msvc", "x86_64-pc-windows-msvc",
"x86_64-unknown-freebsd",
"x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl" "x86_64-unknown-linux-musl"
] ]
@ -107,97 +109,98 @@
"homepage": "https://rollupjs.org/", "homepage": "https://rollupjs.org/",
"optionalDependencies": { "optionalDependencies": {
"fsevents": "~2.3.2", "fsevents": "~2.3.2",
"@rollup/rollup-darwin-arm64": "4.21.1", "@rollup/rollup-darwin-arm64": "4.26.0",
"@rollup/rollup-android-arm64": "4.21.1", "@rollup/rollup-android-arm64": "4.26.0",
"@rollup/rollup-win32-arm64-msvc": "4.21.1", "@rollup/rollup-win32-arm64-msvc": "4.26.0",
"@rollup/rollup-linux-arm64-gnu": "4.21.1", "@rollup/rollup-freebsd-arm64": "4.26.0",
"@rollup/rollup-linux-arm64-musl": "4.21.1", "@rollup/rollup-linux-arm64-gnu": "4.26.0",
"@rollup/rollup-android-arm-eabi": "4.21.1", "@rollup/rollup-linux-arm64-musl": "4.26.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.21.1", "@rollup/rollup-android-arm-eabi": "4.26.0",
"@rollup/rollup-linux-arm-musleabihf": "4.21.1", "@rollup/rollup-linux-arm-gnueabihf": "4.26.0",
"@rollup/rollup-win32-ia32-msvc": "4.21.1", "@rollup/rollup-linux-arm-musleabihf": "4.26.0",
"@rollup/rollup-linux-riscv64-gnu": "4.21.1", "@rollup/rollup-win32-ia32-msvc": "4.26.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.21.1", "@rollup/rollup-linux-riscv64-gnu": "4.26.0",
"@rollup/rollup-linux-s390x-gnu": "4.21.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.26.0",
"@rollup/rollup-darwin-x64": "4.21.1", "@rollup/rollup-linux-s390x-gnu": "4.26.0",
"@rollup/rollup-win32-x64-msvc": "4.21.1", "@rollup/rollup-darwin-x64": "4.26.0",
"@rollup/rollup-linux-x64-gnu": "4.21.1", "@rollup/rollup-win32-x64-msvc": "4.26.0",
"@rollup/rollup-linux-x64-musl": "4.21.1" "@rollup/rollup-freebsd-x64": "4.26.0",
"@rollup/rollup-linux-x64-gnu": "4.26.0",
"@rollup/rollup-linux-x64-musl": "4.26.0"
}, },
"dependencies": { "dependencies": {
"@types/estree": "1.0.5" "@types/estree": "1.0.6"
}, },
"devDependenciesComments": { "devDependenciesComments": {
"@types/node": "Version 18.19.0 breaks chokidar and vite types",
"core-js": "We only update manually as every update requires a snapshot update" "core-js": "We only update manually as every update requires a snapshot update"
}, },
"devDependencies": { "devDependencies": {
"@codemirror/commands": "^6.6.0", "@codemirror/commands": "^6.7.1",
"@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-javascript": "^6.2.2",
"@codemirror/language": "^6.10.2", "@codemirror/language": "^6.10.3",
"@codemirror/search": "^6.5.6", "@codemirror/search": "^6.5.7",
"@codemirror/state": "^6.4.1", "@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.32.0", "@codemirror/view": "^6.34.2",
"@eslint/js": "^9.9.0", "@eslint/js": "^9.14.0",
"@inquirer/prompts": "^7.0.1",
"@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/sourcemap-codec": "^1.5.0",
"@mermaid-js/mermaid-cli": "^10.9.1", "@mermaid-js/mermaid-cli": "^11.4.0",
"@napi-rs/cli": "^2.18.4", "@napi-rs/cli": "^2.18.4",
"@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-buble": "^1.0.3", "@rollup/plugin-buble": "^1.0.3",
"@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-json": "^6.1.0", "@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^5.0.7", "@rollup/plugin-replace": "^6.0.1",
"@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6", "@rollup/plugin-typescript": "^12.1.1",
"@rollup/pluginutils": "^5.1.0", "@rollup/pluginutils": "^5.1.3",
"@shikijs/vitepress-twoslash": "^1.14.1", "@shikijs/vitepress-twoslash": "^1.22.2",
"@types/eslint": "^9.6.0", "@types/mocha": "^10.0.9",
"@types/inquirer": "^9.0.7", "@types/node": "^18.19.64",
"@types/mocha": "^10.0.7",
"@types/node": "~18.18.14",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@types/yargs-parser": "^21.0.3", "@types/yargs-parser": "^21.0.3",
"acorn": "^8.12.1", "@vue/language-server": "^2.1.10",
"acorn": "^8.14.0",
"acorn-import-assertions": "^1.9.0", "acorn-import-assertions": "^1.9.0",
"acorn-jsx": "^5.3.2",
"buble": "^0.20.0", "buble": "^0.20.0",
"builtin-modules": "^4.0.0", "builtin-modules": "^4.0.0",
"chokidar": "^3.6.0", "chokidar": "^3.6.0",
"colorette": "^2.0.20", "colorette": "^2.0.20",
"concurrently": "^8.2.2", "concurrently": "^9.1.0",
"core-js": "3.36.0", "core-js": "3.38.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"date-time": "^4.0.0", "date-time": "^4.0.0",
"es5-shim": "^4.6.7", "es5-shim": "^4.6.7",
"es6-shim": "^0.35.8", "es6-shim": "^0.35.8",
"eslint": "^9.9.0", "eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1", "eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-unicorn": "^55.0.0", "eslint-plugin-unicorn": "^56.0.0",
"eslint-plugin-vue": "^9.27.0", "eslint-plugin-vue": "^9.30.0",
"fixturify": "^3.0.0", "fixturify": "^3.0.0",
"flru": "^1.0.2", "flru": "^1.0.2",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"github-api": "^3.4.0", "github-api": "^3.4.0",
"globals": "^15.9.0", "globals": "^15.12.0",
"husky": "^9.1.4", "husky": "^9.1.6",
"inquirer": "^10.1.8",
"is-reference": "^3.0.2", "is-reference": "^3.0.2",
"lint-staged": "^15.2.9", "lint-staged": "^15.2.10",
"locate-character": "^3.0.0", "locate-character": "^3.0.0",
"magic-string": "^0.30.11", "magic-string": "^0.30.12",
"mocha": "^10.7.3", "mocha": "^10.8.2",
"nodemon": "^3.1.4", "nodemon": "^3.1.7",
"npm-audit-resolver": "^3.0.0-RC.0", "npm-audit-resolver": "^3.0.0-RC.0",
"nyc": "^17.0.0", "nyc": "^17.1.0",
"pinia": "^2.2.2", "pinia": "^2.2.6",
"prettier": "^3.3.3", "prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.0.0", "prettier-plugin-organize-imports": "^4.1.0",
"pretty-bytes": "^6.1.1", "pretty-bytes": "^6.1.1",
"pretty-ms": "^9.1.0", "pretty-ms": "^9.1.0",
"requirejs": "^2.3.7", "requirejs": "^2.3.7",
"rollup": "^4.21.0", "rollup": "^4.24.4",
"rollup-plugin-license": "^3.5.2", "rollup-plugin-license": "^3.5.3",
"rollup-plugin-string": "^3.0.0", "rollup-plugin-string": "^3.0.0",
"semver": "^7.6.3", "semver": "^7.6.3",
"shx": "^0.3.4", "shx": "^0.3.4",
@ -205,22 +208,24 @@
"source-map": "^0.7.4", "source-map": "^0.7.4",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"systemjs": "^6.15.1", "systemjs": "^6.15.1",
"terser": "^5.31.6", "terser": "^5.36.0",
"tslib": "^2.6.3", "tslib": "^2.8.1",
"typescript": "^5.5.4", "typescript": "^5.6.3",
"typescript-eslint": "^8.2.0", "typescript-eslint": "^8.13.0",
"vite": "^5.4.1", "vite": "^5.4.10",
"vitepress": "^1.3.3", "vitepress": "^1.5.0",
"vue": "^3.4.38", "vue": "^3.5.12",
"wasm-pack": "^0.13.0", "vue-tsc": "^2.1.10",
"wasm-pack": "^0.13.1",
"yargs-parser": "^21.1.1" "yargs-parser": "^21.1.1"
}, },
"overrides": { "overrides": {
"axios": "^1.7.4", "axios": "^1.7.7",
"semver": "^7.6.3", "semver": "^7.6.3",
"ws": "^8.18.0" "ws": "^8.18.0"
}, },
"overrides_comments": { "comments": {
"vue-tsc": "This is necessary so that prettier-plugin-organize-imports works correctly in Vue templatges",
"ws": "mermaid requires an older 8.13.0 version via puppeteer with vulnerabilities" "ws": "mermaid requires an older 8.13.0 version via puppeteer with vulnerabilities"
}, },
"files": [ "files": [

@ -151,7 +151,9 @@ SourceMapConsumer.prototype.eachMapping =
for (var i = 0, n = mappings.length; i < n; i++) { for (var i = 0, n = mappings.length; i < n; i++) {
var mapping = mappings[i]; var mapping = mappings[i];
var source = mapping.source === null ? null : sources.at(mapping.source); var source = mapping.source === null ? null : sources.at(mapping.source);
if(source !== null) {
source = util.computeSourceURL(sourceRoot, source, sourceMapURL); source = util.computeSourceURL(sourceRoot, source, sourceMapURL);
}
boundCallback({ boundCallback({
source: source, source: source,
generatedLine: mapping.generatedLine, generatedLine: mapping.generatedLine,
@ -1142,7 +1144,9 @@ IndexedSourceMapConsumer.prototype._parseMappings =
var mapping = sectionMappings[j]; var mapping = sectionMappings[j];
var source = section.consumer._sources.at(mapping.source); var source = section.consumer._sources.at(mapping.source);
if(source !== null) {
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
}
this._sources.add(source); this._sources.add(source);
source = this._sources.indexOf(source); source = this._sources.indexOf(source);

@ -1,7 +1,7 @@
{ {
"name": "source-map-js", "name": "source-map-js",
"description": "Generates and consumes source maps", "description": "Generates and consumes source maps",
"version": "1.2.0", "version": "1.2.1",
"homepage": "https://github.com/7rulnik/source-map-js", "homepage": "https://github.com/7rulnik/source-map-js",
"author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>", "author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>",
"contributors": [ "contributors": [

@ -1,4 +1,3 @@
declare module 'source-map-js' {
export interface StartOfSourceMap { export interface StartOfSourceMap {
file?: string; file?: string;
sourceRoot?: string; sourceRoot?: string;
@ -36,12 +35,12 @@ declare module 'source-map-js' {
} }
export interface MappingItem { export interface MappingItem {
source: string; source: string | null;
generatedLine: number; generatedLine: number;
generatedColumn: number; generatedColumn: number;
originalLine: number; originalLine: number | null;
originalColumn: number; originalColumn: number | null;
name: string; name: string | null;
} }
export class SourceMapConsumer { export class SourceMapConsumer {
@ -52,29 +51,35 @@ declare module 'source-map-js' {
static LEAST_UPPER_BOUND: number; static LEAST_UPPER_BOUND: number;
constructor(rawSourceMap: RawSourceMap); constructor(rawSourceMap: RawSourceMap);
readonly file: string | undefined | null;
readonly sourceRoot: string | undefined | null;
readonly sourcesContent: readonly string[] | null | undefined;
readonly sources: readonly string[]
computeColumnSpans(): void; computeColumnSpans(): void;
originalPositionFor(generatedPosition: FindPosition): MappedPosition; originalPositionFor(generatedPosition: FindPosition): MappedPosition;
generatedPositionFor(originalPosition: SourceFindPosition): LineRange; generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; allGeneratedPositionsFor(originalPosition: MappedPosition): Position[];
hasContentsOfAllSources(): boolean; hasContentsOfAllSources(): boolean;
sourceContentFor(source: string, returnNullOnMissing?: boolean): string; sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null;
eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void;
} }
export interface Mapping { export interface Mapping {
generated: Position; generated: Position;
original: Position; original?: Position | null;
source: string; source?: string | null;
name?: string; name?: string | null;
} }
export class SourceMapGenerator { export class SourceMapGenerator {
constructor(startOfSourceMap?: StartOfSourceMap); constructor(startOfSourceMap?: StartOfSourceMap);
static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator;
addMapping(mapping: Mapping): void; addMapping(mapping: Mapping): void;
setSourceContent(sourceFile: string, sourceContent: string): void; setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void;
applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
toString(): string; toString(): string;
toJSON(): RawSourceMap;
} }
export interface CodeWithSourceMap { export interface CodeWithSourceMap {
@ -97,19 +102,3 @@ declare module 'source-map-js' {
toString(): string; toString(): string;
toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
} }
}
declare module 'source-map-js/lib/source-map-generator' {
import { SourceMapGenerator } from 'source-map-js'
export { SourceMapGenerator }
}
declare module 'source-map-js/lib/source-map-consumer' {
import { SourceMapConsumer } from 'source-map-js'
export { SourceMapConsumer }
}
declare module 'source-map-js/lib/source-node' {
import { SourceNode } from 'source-map-js'
export { SourceNode }
}

@ -1,27 +0,0 @@
'use strict';
let fastProto = null;
// Creates an object with permanently fast properties in V8. See Toon Verwaest's
// post https://medium.com/@tverwaes/setting-up-prototypes-in-v8-ec9c9491dfe2#5f62
// for more details. Use %HasFastProperties(object) and the Node.js flag
// --allow-natives-syntax to check whether an object has fast properties.
function FastObject(o) {
// A prototype object will have "fast properties" enabled once it is checked
// against the inline property cache of a function, e.g. fastProto.property:
// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63
if (fastProto !== null && typeof fastProto.property) {
const result = fastProto;
fastProto = FastObject.prototype = null;
return result;
}
fastProto = FastObject.prototype = o == null ? Object.create(null) : o;
return new FastObject;
}
// Initialize the inline property cache of FastObject
FastObject();
module.exports = function toFastproperties(o) {
return FastObject(o);
};

@ -1,10 +0,0 @@
MIT License
Copyright (c) 2014 Petka Antonov
2015 Sindre Sorhus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -1,35 +0,0 @@
{
"name": "to-fast-properties",
"version": "2.0.0",
"description": "Force V8 to use fast properties for an object",
"license": "MIT",
"repository": "sindresorhus/to-fast-properties",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "node --allow-natives-syntax test.js"
},
"files": [
"index.js"
],
"keywords": [
"object",
"obj",
"properties",
"props",
"v8",
"optimize",
"fast",
"convert",
"mode"
],
"devDependencies": {
"ava": "0.0.4"
}
}

@ -1,37 +0,0 @@
# to-fast-properties [![Build Status](https://travis-ci.org/sindresorhus/to-fast-properties.svg?branch=master)](https://travis-ci.org/sindresorhus/to-fast-properties)
> Force V8 to use fast properties for an object
[Read more.](http://stackoverflow.com/questions/24987896/)
Use `%HasFastProperties(object)` and `--allow-natives-syntax` to check whether an object already has fast properties.
## Install
```
$ npm install --save to-fast-properties
```
## Usage
```js
const toFastProperties = require('to-fast-properties');
const obj = {
foo: true,
bar: true
};
delete obj.foo;
// `obj` now has slow properties
toFastProperties(obj);
// `obj` now has fast properties
```
## License
MIT © Petka Antonov, John-David Dalton, Sindre Sorhus

@ -3,7 +3,7 @@ Vite is released under the MIT license:
MIT License MIT License
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors Copyright (c) 2019-present, VoidZero Inc. and Vite contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save