diff --git a/apps/web/package.json b/apps/web/package.json index bfbdeb8a7b..e1824b4ad7 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,6 +14,9 @@ "pattern:build": "email build -d ./components" }, "dependencies": { + "@babel/parser": "7.24.5", + "@babel/preset-typescript": "7.24.7", + "@babel/traverse": "7.25.6", "@react-email/components": "npm:@react-email/components@latest", "@responsive-email/react-email": "0.0.3", "@supabase/supabase-js": "2.45.1", @@ -29,9 +32,6 @@ "vaul": "^0.9.1" }, "devDependencies": { - "@babel/core": "7.24.5", - "@babel/parser": "7.24.5", - "@babel/preset-typescript": "7.24.7", "@next/eslint-plugin-next": "14.2.3", "@radix-ui/colors": "1.0.1", "@radix-ui/react-select": "^2.1.1", @@ -39,6 +39,7 @@ "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-tooltip": "1.1.1", "@types/babel__core": "7.20.5", + "@types/babel__traverse": "7.20.6", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", @@ -54,6 +55,7 @@ "tailwindcss": "3.4.3", "tsconfig": "workspace:*", "typescript": "5.1.6", + "webpack": "5.94.0", "zod": "3.23.8" } } diff --git a/apps/web/src/app/components/get-components.tsx b/apps/web/src/app/components/get-components.tsx index ac9e1bd3b8..f14377f83e 100644 --- a/apps/web/src/app/components/get-components.tsx +++ b/apps/web/src/app/components/get-components.tsx @@ -1,6 +1,6 @@ import { promises as fs } from "node:fs"; import path from "node:path"; -import { traverse } from "@babel/core"; +import traverse from "@babel/traverse"; import { parse } from "@babel/parser"; import { z } from "zod"; import { render } from "@react-email/components"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c6c4d9cf4..a87bf9a245 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -93,6 +93,15 @@ importers: apps/web: dependencies: + '@babel/parser': + specifier: 7.24.5 + version: 7.24.5 + '@babel/preset-typescript': + specifier: 7.24.7 + version: 7.24.7(@babel/core@7.24.5) + '@babel/traverse': + specifier: 7.25.6 + version: 7.25.6 '@react-email/components': specifier: npm:@react-email/components@latest version: 0.0.23(react-dom@19.0.0-rc-187dd6a7-20240806(react@19.0.0-rc-187dd6a7-20240806))(react@19.0.0-rc-187dd6a7-20240806) @@ -133,15 +142,6 @@ importers: specifier: ^0.9.1 version: 0.9.1(react-dom@19.0.0-rc-187dd6a7-20240806(react@19.0.0-rc-187dd6a7-20240806))(react@19.0.0-rc-187dd6a7-20240806)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) devDependencies: - '@babel/core': - specifier: 7.24.5 - version: 7.24.5 - '@babel/parser': - specifier: 7.24.5 - version: 7.24.5 - '@babel/preset-typescript': - specifier: 7.24.7 - version: 7.24.7(@babel/core@7.24.5) '@next/eslint-plugin-next': specifier: 14.2.3 version: 14.2.3 @@ -163,6 +163,9 @@ importers: '@types/babel__core': specifier: 7.20.5 version: 7.20.5 + '@types/babel__traverse': + specifier: 7.20.6 + version: 7.20.6 '@types/node': specifier: ^20 version: 20.16.1 @@ -208,6 +211,9 @@ importers: typescript: specifier: 5.1.6 version: 5.1.6 + webpack: + specifier: 5.94.0 + version: 5.94.0(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1) zod: specifier: 3.23.8 version: 3.23.8 @@ -1587,8 +1593,8 @@ packages: resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.4': - resolution: {integrity: sha512-NFtZmZsyzDPJnk9Zg3BbTfKKc9UlHYzD0E//p2Z3B9nCwwtJW9T0gVbCz8+fBngnn4zf1Dr3IK8PHQQHq0lDQw==} + '@babel/generator@7.25.6': + resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.24.7': @@ -1609,14 +1615,6 @@ packages: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} - '@babel/helper-function-name@7.23.0': - resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-hoist-variables@7.22.5': - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - '@babel/helper-member-expression-to-functions@7.24.8': resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} @@ -1716,8 +1714,8 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.25.4': - resolution: {integrity: sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==} + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} hasBin: true @@ -1763,24 +1761,16 @@ packages: resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.5': - resolution: {integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==} - engines: {node: '>=6.9.0'} - - '@babel/traverse@7.25.4': - resolution: {integrity: sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.24.0': - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} + '@babel/traverse@7.25.6': + resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} engines: {node: '>=6.9.0'} '@babel/types@7.24.5': resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.4': - resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} '@changesets/apply-release-plan@7.0.4': @@ -3928,8 +3918,8 @@ packages: '@types/babel__template@7.4.4': resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - '@types/babel__traverse@7.20.5': - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} '@types/cookie@0.4.1': resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} @@ -4274,6 +4264,11 @@ packages: peerDependencies: acorn: ^8 + acorn-import-attributes@1.9.5: + resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} + peerDependencies: + acorn: ^8 + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -4961,6 +4956,10 @@ packages: resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} engines: {node: '>=10.13.0'} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + engines: {node: '>=10.13.0'} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -8087,6 +8086,16 @@ packages: webpack-cli: optional: true + webpack@5.94.0: + resolution: {integrity: sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + whatwg-encoding@2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} @@ -8805,7 +8814,7 @@ snapshots: '@babel/helpers': 7.24.5 '@babel/parser': 7.24.5 '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 + '@babel/traverse': 7.25.6 '@babel/types': 7.24.5 convert-source-map: 2.0.0 debug: 4.3.4 @@ -8825,21 +8834,21 @@ snapshots: '@babel/generator@7.24.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/generator@7.25.4': + '@babel/generator@7.25.6': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/helper-compilation-targets@7.23.6': dependencies: @@ -8857,37 +8866,28 @@ snapshots: '@babel/helper-optimise-call-expression': 7.24.7 '@babel/helper-replace-supers': 7.25.0(@babel/core@7.24.5) '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/traverse': 7.25.4 + '@babel/traverse': 7.25.6 semver: 6.3.1 transitivePeerDependencies: - supports-color '@babel/helper-environment-visitor@7.22.20': {} - '@babel/helper-function-name@7.23.0': - dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 - - '@babel/helper-hoist-variables@7.22.5': - dependencies: - '@babel/types': 7.24.5 - '@babel/helper-member-expression-to-functions@7.24.8': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.24.3': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.25.6 '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -8906,13 +8906,13 @@ snapshots: '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.4 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/helper-plugin-utils@7.24.8': {} @@ -8921,31 +8921,31 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-member-expression-to-functions': 7.24.8 '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/traverse': 7.25.4 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-simple-access@7.24.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.25.6 '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/traverse': 7.25.4 - '@babel/types': 7.25.4 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.24.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.25.6 '@babel/helper-string-parser@7.24.1': {} @@ -8964,8 +8964,8 @@ snapshots: '@babel/helpers@7.24.5': dependencies: '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -8987,9 +8987,9 @@ snapshots: dependencies: '@babel/types': 7.24.5 - '@babel/parser@7.25.4': + '@babel/parser@7.25.6': dependencies: - '@babel/types': 7.25.4 + '@babel/types': 7.25.6 '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.5)': dependencies: @@ -9040,54 +9040,33 @@ snapshots: dependencies: '@babel/code-frame': 7.24.2 '@babel/parser': 7.24.5 - '@babel/types': 7.24.0 + '@babel/types': 7.25.6 '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.4 - '@babel/types': 7.25.4 - - '@babel/traverse@7.24.5': - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 - '@babel/traverse@7.25.4': + '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.4 - '@babel/parser': 7.25.4 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 - '@babel/types': 7.25.4 - debug: 4.3.4 + '@babel/types': 7.25.6 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.0': - dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - '@babel/types@7.24.5': dependencies: '@babel/helper-string-parser': 7.24.1 '@babel/helper-validator-identifier': 7.24.5 to-fast-properties: 2.0.0 - '@babel/types@7.25.4': + '@babel/types@7.25.6': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 @@ -11112,7 +11091,7 @@ snapshots: '@babel/types': 7.24.5 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: @@ -11123,9 +11102,9 @@ snapshots: '@babel/parser': 7.24.5 '@babel/types': 7.24.5 - '@types/babel__traverse@7.20.5': + '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.25.6 '@types/cookie@0.4.1': {} @@ -11640,6 +11619,10 @@ snapshots: dependencies: acorn: 8.11.3 + acorn-import-attributes@1.9.5(acorn@8.11.3): + dependencies: + acorn: 8.11.3 + acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 @@ -12423,6 +12406,11 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.1 + enhanced-resolve@5.17.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -15410,6 +15398,18 @@ snapshots: '@swc/core': 1.4.15(@swc/helpers@0.5.12) esbuild: 0.19.11 + terser-webpack-plugin@5.3.10(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1)(webpack@5.94.0(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1)): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.30.3 + webpack: 5.94.0(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1) + optionalDependencies: + '@swc/core': 1.4.15(@swc/helpers@0.5.12) + esbuild: 0.23.1 + terser@5.30.3: dependencies: '@jridgewell/source-map': 0.3.6 @@ -16241,6 +16241,36 @@ snapshots: - esbuild - uglify-js + webpack@5.94.0(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1): + dependencies: + '@types/estree': 1.0.5 + '@webassemblyjs/ast': 1.12.1 + '@webassemblyjs/wasm-edit': 1.12.1 + '@webassemblyjs/wasm-parser': 1.12.1 + acorn: 8.11.3 + acorn-import-attributes: 1.9.5(acorn@8.11.3) + browserslist: 4.23.0 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1)(webpack@5.94.0(@swc/core@1.4.15(@swc/helpers@0.5.12))(esbuild@0.23.1)) + watchpack: 2.4.1 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + whatwg-encoding@2.0.0: dependencies: iconv-lite: 0.6.3