From 3588e3e29552ed4ccda077c8a6bf7b51de23d10e Mon Sep 17 00:00:00 2001 From: fi3ework Date: Thu, 17 Oct 2024 20:34:12 +0800 Subject: [PATCH 1/5] feat: support node polyfill --- packages/core/src/config.ts | 9 + .../tests/__snapshots__/config.test.ts.snap | 24 + pnpm-lock.yaml | 709 +++++++++++++++++- tests/README.md | 37 +- .../node-polyfill/bundle-false/package.json | 14 + .../bundle-false/rslib.config.ts | 37 + .../node-polyfill/bundle-false/src/buffer1.ts | 1 + .../node-polyfill/bundle-false/src/buffer2.ts | 1 + .../node-polyfill/bundle-false/src/index.ts | 2 + .../node-polyfill/bundle-false/tsconfig.json | 7 + .../node-polyfill/bundle/package.json | 13 + .../node-polyfill/bundle/rslib.config.ts | 30 + .../node-polyfill/bundle/src/buffer1.ts | 1 + .../node-polyfill/bundle/src/buffer2.ts | 1 + .../node-polyfill/bundle/src/index.ts | 2 + .../node-polyfill/bundle/tsconfig.json | 7 + tests/integration/node-polyfill/index.test.ts | 44 ++ 17 files changed, 933 insertions(+), 6 deletions(-) create mode 100644 tests/integration/node-polyfill/bundle-false/package.json create mode 100644 tests/integration/node-polyfill/bundle-false/rslib.config.ts create mode 100644 tests/integration/node-polyfill/bundle-false/src/buffer1.ts create mode 100644 tests/integration/node-polyfill/bundle-false/src/buffer2.ts create mode 100644 tests/integration/node-polyfill/bundle-false/src/index.ts create mode 100644 tests/integration/node-polyfill/bundle-false/tsconfig.json create mode 100644 tests/integration/node-polyfill/bundle/package.json create mode 100644 tests/integration/node-polyfill/bundle/rslib.config.ts create mode 100644 tests/integration/node-polyfill/bundle/src/buffer1.ts create mode 100644 tests/integration/node-polyfill/bundle/src/buffer2.ts create mode 100644 tests/integration/node-polyfill/bundle/src/index.ts create mode 100644 tests/integration/node-polyfill/bundle/tsconfig.json create mode 100644 tests/integration/node-polyfill/index.test.ts diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 03e324586..cd9a880ac 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -417,10 +417,19 @@ export async function createConstantRsbuildConfig(): Promise { dev: { progressBar: false, }, + performance: { + chunkSplit: { + strategy: 'custom', + }, + }, tools: { htmlPlugin: false, rspack: { optimization: { + splitChunks: { + // Splitted "sync" chunks will make entry modules can't be inlined. + chunks: 'async', + }, moduleIds: 'named', nodeEnv: false, }, diff --git a/packages/core/tests/__snapshots__/config.test.ts.snap b/packages/core/tests/__snapshots__/config.test.ts.snap index c4b17f0a4..e24313b11 100644 --- a/packages/core/tests/__snapshots__/config.test.ts.snap +++ b/packages/core/tests/__snapshots__/config.test.ts.snap @@ -48,6 +48,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "not dead", ], }, + "performance": { + "chunkSplit": { + "strategy": "custom", + }, + }, "plugins": [], "source": { "alias": { @@ -71,6 +76,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "optimization": { "moduleIds": "named", "nodeEnv": false, + "splitChunks": { + "chunks": "async", + }, }, "resolve": { "extensionAlias": { @@ -199,6 +207,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "not dead", ], }, + "performance": { + "chunkSplit": { + "strategy": "custom", + }, + }, "plugins": [ { "name": "rsbuild:cjs-import-meta-url-shim", @@ -231,6 +244,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "optimization": { "moduleIds": "named", "nodeEnv": false, + "splitChunks": { + "chunks": "async", + }, }, "resolve": { "extensionAlias": { @@ -348,6 +364,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "not dead", ], }, + "performance": { + "chunkSplit": { + "strategy": "custom", + }, + }, "source": { "alias": { "bar": "bar", @@ -370,6 +391,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "optimization": { "moduleIds": "named", "nodeEnv": false, + "splitChunks": { + "chunks": "async", + }, }, "resolve": { "extensionAlias": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d347a13a..bbef63905 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -566,6 +566,35 @@ importers: tests/integration/minify/default: {} + tests/integration/node-polyfill/bundle: + dependencies: + core-js: + specifier: ^3.38.1 + version: 3.38.1 + core-js-pure: + specifier: ^3.38.1 + version: 3.38.1 + devDependencies: + '@rsbuild/plugin-node-polyfill': + specifier: ^1.2.0 + version: 1.2.0(@rsbuild/core@1.0.16) + + tests/integration/node-polyfill/bundle-false: + dependencies: + buffer: + specifier: ^6.0.3 + version: 6.0.3 + core-js: + specifier: ^3.38.1 + version: 3.38.1 + core-js-pure: + specifier: ^3.38.1 + version: 3.38.1 + devDependencies: + '@rsbuild/plugin-node-polyfill': + specifier: ^1.2.0 + version: 1.2.0(@rsbuild/core@1.0.16) + tests/integration/require/import-dynamic: {} tests/integration/require/require-as-expression: {} @@ -1435,6 +1464,14 @@ packages: peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 + '@rsbuild/plugin-node-polyfill@1.2.0': + resolution: {integrity: sha512-mYctpK5Jn2yxTOxQ4rOJ0iFBJNW7sADFtKsLp9dL7MjToMhKiyIs4Mc65piI7B+YOBshdyMqCk3LPjJ+CtSRXQ==} + peerDependencies: + '@rsbuild/core': 1.x || ^1.0.1-beta.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + '@rsbuild/plugin-react@1.0.4': resolution: {integrity: sha512-lZQPl2Ocw3mxdR8dGZNTx70iLILt/p1B4oAStDNnDCVK9mzeCzpG67IYP82KaAJ5KowXTPLRqEkF9fKr5lWPPA==} peerDependencies: @@ -1992,6 +2029,10 @@ packages: resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} hasBin: true + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -2099,6 +2140,12 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + + assert@2.1.0: + resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} + assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -2121,6 +2168,10 @@ packages: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + axios@1.7.7: resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} @@ -2157,6 +2208,12 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + body-parser@1.20.3: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -2177,11 +2234,39 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + + browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + + browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + + browserify-rsa@4.1.1: + resolution: {integrity: sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==} + engines: {node: '>= 0.10'} + + browserify-sign@4.2.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + + browserify-zlib@0.2.0: + resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + browserslist@4.23.3: resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + btoa@1.2.1: resolution: {integrity: sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==} engines: {node: '>= 0.4.0'} @@ -2193,9 +2278,18 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + builtin-status-codes@3.0.0: + resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} @@ -2295,6 +2389,9 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -2387,6 +2484,12 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + console-browserify@1.2.0: + resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} + + constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -2412,9 +2515,15 @@ packages: copy-to-clipboard@3.3.3: resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + core-js-pure@3.38.1: + resolution: {integrity: sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==} + core-js@3.38.1: resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + corser@2.0.1: resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==} engines: {node: '>= 0.4.0'} @@ -2428,6 +2537,15 @@ packages: typescript: optional: true + create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-rstack@1.0.7: resolution: {integrity: sha512-4bk9MZvovQEMwrIFGdX7BOzw4FQmx5+bzImSaZ5QliQsoQo3KQF0Es3BgWX2rXOa0sY3lsfeke4Vtbz9CydXkw==} @@ -2447,6 +2565,9 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + cspell-ban-words@0.0.4: resolution: {integrity: sha512-w+18WPFAEmo2F+Fr4L29+GdY5ckOLN95WPwb/arfrtuzzB5VzQRFyIujo0T7pq+xFE0Z2gjfLn33Wk/u5ctNQQ==} @@ -2538,6 +2659,10 @@ packages: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -2557,6 +2682,9 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -2590,6 +2718,9 @@ packages: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} + diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2606,6 +2737,10 @@ packages: dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + domain-browser@5.7.0: + resolution: {integrity: sha512-edTFu0M/7wO1pXY6GDxVNVW086uqwWYIHP98txhcPyV995X21JIH2DtYp33sQJOupYoXKe9RwTw2Ya2vWaquTQ==} + engines: {node: '>=4'} + domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} @@ -2646,6 +2781,12 @@ packages: electron-to-chromium@1.5.15: resolution: {integrity: sha512-Z4rIDoImwEJW+YYKnPul4DzqsWVqYetYVN3XqDmRpgV0mjz0hYTaeeh+8/9CL1bk3AHYmF4freW/NTiVoXA2gA==} + electron-to-chromium@1.5.40: + resolution: {integrity: sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==} + + elliptic@6.5.7: + resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} + emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -2769,6 +2910,10 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -2776,6 +2921,9 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} + evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -2884,6 +3032,9 @@ packages: debug: optional: true + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + foreground-child@3.3.0: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} @@ -3058,6 +3209,17 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} + hash-base@3.0.4: + resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} + engines: {node: '>=4'} + + hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -3120,6 +3282,9 @@ packages: highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -3177,6 +3342,9 @@ packages: engines: {node: '>=12'} hasBin: true + https-browserify@1.0.0: + resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} @@ -3246,6 +3414,10 @@ packages: is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -3260,6 +3432,10 @@ packages: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + is-core-module@2.15.0: resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} engines: {node: '>= 0.4'} @@ -3313,6 +3489,10 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} + is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -3340,6 +3520,10 @@ packages: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} @@ -3360,6 +3544,9 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -3566,6 +3753,9 @@ packages: markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + mdast-util-definitions@5.1.2: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} @@ -3757,6 +3947,10 @@ packages: resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} engines: {node: '>=8.6'} + miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -3778,6 +3972,12 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimatch@3.0.8: resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} @@ -3896,6 +4096,18 @@ packages: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} + object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -3930,6 +4142,9 @@ packages: resolution: {integrity: sha512-GQEkNkH/GHOhPFXcqZs3IDahXEQcQxsSjEkK4KvEEST4t7eNzoMjxTzef+EZ+JluDEV+Raoi3WQ2CflnRdSVnQ==} engines: {node: '>=18'} + os-browserify@0.3.0: + resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -3971,10 +4186,17 @@ packages: package-manager-detector@0.2.0: resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + parse-entities@2.0.0: resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} @@ -4002,6 +4224,9 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -4038,6 +4263,10 @@ packages: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + peberminta@0.9.0: resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==} @@ -4084,6 +4313,10 @@ packages: resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} engines: {node: '>= 0.12.0'} + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + postcss-alias@2.0.0: resolution: {integrity: sha512-SzsjZdGaqVRql33315QLrhnNpNvvH2skp0hXpjzz+nYmaSwXSUjk4JADJRi7zUkwYyCXj41fy1go5MR3S9TDyg==} @@ -4166,6 +4399,13 @@ packages: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'} + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -4185,6 +4425,12 @@ packages: pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -4193,6 +4439,10 @@ packages: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} + querystring-es3@0.2.1: + resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} + engines: {node: '>=0.4.x'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -4205,6 +4455,9 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -4293,10 +4546,17 @@ packages: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} + readable-stream@4.5.2: + resolution: {integrity: sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -4382,6 +4642,9 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + rollup-plugin-dts@6.1.1: resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} @@ -4626,9 +4889,16 @@ packages: resolution: {integrity: sha512-zTEg4HL0RwVrqcWs3ztF+x1vkxfm0lP+MQQFPiMJTKVceBwEV0A569Ou8l9IYQG8jOZdMVI1hGsc0tmeD2o/Lw==} engines: {node: '>=11.0'} + setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} @@ -4742,6 +5012,12 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} + stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + + stream-http@3.2.0: + resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} + streamroller@3.1.5: resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==} engines: {node: '>=8.0'} @@ -4762,6 +5038,9 @@ packages: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -4883,6 +5162,10 @@ packages: peerDependencies: tslib: ^2 + timers-browserify@2.0.12: + resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} + engines: {node: '>=0.6.0'} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -4964,6 +5247,9 @@ packages: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} engines: {node: '>=0.6.x'} + tty-browserify@0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + type-fest@3.13.1: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} @@ -5050,6 +5336,10 @@ packages: url-join@4.0.1: resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + use-callback-ref@1.3.2: resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==} engines: {node: '>=10'} @@ -5073,6 +5363,9 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} @@ -5165,6 +5458,9 @@ packages: jsdom: optional: true + vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + w-json@1.3.10: resolution: {integrity: sha512-XadVyw0xE+oZ5FGApXsdswv96rOhStzKqL53uSe5UaTadABGkWIg1+DTx8kiZ/VqTZTBneoL0l65RcPe4W3ecw==} @@ -5200,6 +5496,10 @@ packages: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -6131,6 +6431,34 @@ snapshots: deepmerge: 4.3.1 reduce-configs: 1.0.0 + '@rsbuild/plugin-node-polyfill@1.2.0(@rsbuild/core@1.0.16)': + dependencies: + assert: 2.1.0 + browserify-zlib: 0.2.0 + buffer: 5.7.1 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + crypto-browserify: 3.12.0 + domain-browser: 5.7.0 + events: 3.3.0 + https-browserify: 1.0.0 + os-browserify: 0.3.0 + path-browserify: 1.0.1 + process: 0.11.10 + punycode: 2.3.1 + querystring-es3: 0.2.1 + readable-stream: 4.5.2 + stream-browserify: 3.0.0 + stream-http: 3.2.0 + string_decoder: 1.3.0 + timers-browserify: 2.0.12 + tty-browserify: 0.0.1 + url: 0.11.4 + util: 0.12.5 + vm-browserify: 1.1.2 + optionalDependencies: + '@rsbuild/core': 1.0.16 + '@rsbuild/plugin-react@1.0.4(@rsbuild/core@1.0.16)': dependencies: '@rsbuild/core': 1.0.16 @@ -6809,6 +7137,10 @@ snapshots: dependencies: argparse: 2.0.1 + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + accepts@1.3.8: dependencies: mime-types: 2.1.35 @@ -6903,6 +7235,20 @@ snapshots: array-union@2.1.0: {} + asn1.js@4.10.1: + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + assert@2.1.0: + dependencies: + call-bind: 1.0.7 + is-nan: 1.3.2 + object-is: 1.1.6 + object.assign: 4.1.5 + util: 0.12.5 + assertion-error@2.0.1: {} astral-regex@2.0.0: {} @@ -6917,6 +7263,10 @@ snapshots: at-least-node@1.0.0: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + axios@1.7.7: dependencies: follow-redirects: 1.15.6 @@ -6953,6 +7303,10 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + bn.js@4.12.0: {} + + bn.js@5.2.1: {} + body-parser@1.20.3: dependencies: bytes: 3.1.2 @@ -6987,6 +7341,53 @@ snapshots: dependencies: fill-range: 7.1.1 + brorand@1.1.0: {} + + browserify-aes@1.2.0: + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + browserify-cipher@1.0.1: + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + + browserify-des@1.0.2: + dependencies: + cipher-base: 1.0.4 + des.js: 1.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + browserify-rsa@4.1.1: + dependencies: + bn.js: 5.2.1 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + + browserify-sign@4.2.3: + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.7 + hash-base: 3.0.4 + inherits: 2.0.4 + parse-asn1: 5.1.7 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + + browserify-zlib@0.2.0: + dependencies: + pako: 1.0.11 + browserslist@4.23.3: dependencies: caniuse-lite: 1.0.30001663 @@ -6994,17 +7395,33 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) + browserslist@4.24.0: + dependencies: + caniuse-lite: 1.0.30001663 + electron-to-chromium: 1.5.40 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.24.0) + btoa@1.2.1: {} buffer-builder@0.2.0: {} buffer-from@1.1.2: {} + buffer-xor@1.0.3: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + builtin-status-codes@3.0.0: {} + bytes@3.1.2: {} cac@6.7.14: {} @@ -7104,6 +7521,11 @@ snapshots: ci-info@3.9.0: {} + cipher-base@1.0.4: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -7176,6 +7598,10 @@ snapshots: concat-map@0.0.1: {} + console-browserify@1.2.0: {} + + constants-browserify@1.0.0: {} + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -7197,8 +7623,12 @@ snapshots: dependencies: toggle-selection: 1.0.6 + core-js-pure@3.38.1: {} + core-js@3.38.1: {} + core-util-is@1.0.3: {} + corser@2.0.1: {} cosmiconfig@8.3.6(typescript@5.6.3): @@ -7210,6 +7640,28 @@ snapshots: optionalDependencies: typescript: 5.6.3 + create-ecdh@4.0.4: + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.7 + + create-hash@1.2.0: + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + + create-hmac@1.1.7: + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + create-rstack@1.0.7: {} cron-parser@4.9.0: @@ -7232,6 +7684,20 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crypto-browserify@3.12.0: + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.3 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + cspell-ban-words@0.0.4: {} css-select@5.1.0: @@ -7302,6 +7768,12 @@ snapshots: define-lazy-prop@2.0.0: {} + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + delayed-stream@1.0.0: {} delegates@1.0.0: {} @@ -7312,6 +7784,11 @@ snapshots: dequal@2.0.3: {} + des.js@1.1.0: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + destroy@1.2.0: {} detect-indent@6.1.0: {} @@ -7332,6 +7809,12 @@ snapshots: diff@5.2.0: {} + diffie-hellman@5.0.3: + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -7355,6 +7838,8 @@ snapshots: domhandler: 5.0.3 entities: 4.5.0 + domain-browser@5.7.0: {} + domelementtype@2.3.0: {} domhandler@4.3.1: @@ -7402,6 +7887,18 @@ snapshots: electron-to-chromium@1.5.15: {} + electron-to-chromium@1.5.40: {} + + elliptic@6.5.7: + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + emoji-regex@10.4.0: {} emoji-regex@8.0.0: {} @@ -7530,10 +8027,17 @@ snapshots: etag@1.8.1: {} + event-target-shim@5.0.1: {} + eventemitter3@4.0.7: {} events@3.3.0: {} + evp_bytestokey@1.0.3: + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + execa@5.1.1: dependencies: cross-spawn: 7.0.3 @@ -7681,6 +8185,10 @@ snapshots: follow-redirects@1.15.6: {} + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.3 @@ -7853,6 +8361,22 @@ snapshots: dependencies: has-symbols: 1.0.3 + hash-base@3.0.4: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + + hash-base@3.1.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + + hash.js@1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -7997,6 +8521,12 @@ snapshots: highlight.js@10.7.3: {} + hmac-drbg@1.0.1: + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 @@ -8091,6 +8621,8 @@ snapshots: - debug - supports-color + https-browserify@1.0.0: {} + human-id@1.0.2: {} human-signals@2.1.0: {} @@ -8146,6 +8678,11 @@ snapshots: is-alphabetical: 2.0.1 is-decimal: 2.0.1 + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + is-arrayish@0.2.1: {} is-arrayish@0.3.2: {} @@ -8156,6 +8693,8 @@ snapshots: is-buffer@2.0.5: {} + is-callable@1.2.7: {} + is-core-module@2.15.0: dependencies: hasown: 2.0.2 @@ -8192,6 +8731,11 @@ snapshots: is-interactive@2.0.0: {} + is-nan@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + is-number@7.0.0: {} is-plain-obj@4.1.0: {} @@ -8212,6 +8756,10 @@ snapshots: dependencies: better-path-resolve: 1.0.0 + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + is-unicode-supported@0.1.0: {} is-unicode-supported@1.3.0: {} @@ -8224,6 +8772,8 @@ snapshots: dependencies: is-docker: 2.2.1 + isarray@1.0.0: {} + isexe@2.0.0: {} isobject@3.0.1: {} @@ -8437,6 +8987,12 @@ snapshots: markdown-table@3.0.3: {} + md5.js@1.3.5: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + mdast-util-definitions@5.1.2: dependencies: '@types/mdast': 3.0.15 @@ -8881,6 +9437,11 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + miller-rabin@4.0.1: + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + mime-db@1.52.0: {} mime-types@2.1.35: @@ -8893,6 +9454,10 @@ snapshots: mimic-function@5.0.1: {} + minimalistic-assert@1.0.1: {} + + minimalistic-crypto-utils@1.0.1: {} + minimatch@3.0.8: dependencies: brace-expansion: 1.1.11 @@ -9028,6 +9593,20 @@ snapshots: object-inspect@1.13.2: {} + object-is@1.1.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + + object-keys@1.1.1: {} + + object.assign@4.1.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -9077,6 +9656,8 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.0 + os-browserify@0.3.0: {} + os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -9109,10 +9690,21 @@ snapshots: package-manager-detector@0.2.0: {} + pako@1.0.11: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 + parse-asn1@5.1.7: + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + hash-base: 3.0.4 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + parse-entities@2.0.0: dependencies: character-entities: 1.2.4 @@ -9155,6 +9747,8 @@ snapshots: parseurl@1.3.3: {} + path-browserify@1.0.1: {} + path-exists@4.0.0: {} path-exists@5.0.0: {} @@ -9178,6 +9772,14 @@ snapshots: pathval@2.0.0: {} + pbkdf2@3.1.2: + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + peberminta@0.9.0: {} periscopic@3.1.0: @@ -9216,6 +9818,8 @@ snapshots: transitivePeerDependencies: - supports-color + possible-typed-array-names@1.0.0: {} + postcss-alias@2.0.0: dependencies: postcss: 6.0.23 @@ -9294,6 +9898,10 @@ snapshots: prismjs@1.29.0: {} + process-nextick-args@2.0.1: {} + + process@0.11.10: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -9315,12 +9923,25 @@ snapshots: pseudomap@1.0.2: {} + public-encrypt@4.0.3: + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + parse-asn1: 5.1.7 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + + punycode@1.4.1: {} + punycode@2.3.1: {} qs@6.13.0: dependencies: side-channel: 1.0.6 + querystring-es3@0.2.1: {} + queue-microtask@1.2.3: {} r-json@1.3.0: @@ -9333,6 +9954,11 @@ snapshots: dependencies: safe-buffer: 5.2.1 + randomfill@1.0.4: + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + range-parser@1.2.1: {} raw-body@2.5.2: @@ -9434,12 +10060,30 @@ snapshots: pify: 4.0.1 strip-bom: 3.0.0 + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + readable-stream@3.6.2: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + readable-stream@4.5.2: + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + readdirp@3.6.0: dependencies: picomatch: 2.3.1 @@ -9563,6 +10207,11 @@ snapshots: rfdc@1.4.1: {} + ripemd160@2.0.2: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + rollup-plugin-dts@6.1.1(rollup@4.18.1)(typescript@5.6.3): dependencies: magic-string: 0.30.12 @@ -9814,8 +10463,15 @@ snapshots: is-plain-object: 2.0.4 is-primitive: 3.0.1 + setimmediate@1.0.5: {} + setprototypeof@1.2.0: {} + sha.js@2.4.11: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + shallowequal@1.1.0: {} shebang-command@1.2.0: @@ -9913,6 +10569,18 @@ snapshots: stdin-discarder@0.2.2: {} + stream-browserify@3.0.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + + stream-http@3.2.0: + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + xtend: 4.0.2 + streamroller@3.1.5: dependencies: date-format: 4.0.14 @@ -9941,6 +10609,10 @@ snapshots: get-east-asian-width: 1.2.0 strip-ansi: 7.1.0 + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -10086,6 +10758,10 @@ snapshots: dependencies: tslib: 2.6.3 + timers-browserify@2.0.12: + dependencies: + setimmediate: 1.0.5 + tinybench@2.9.0: {} tinyexec@0.3.0: {} @@ -10141,6 +10817,8 @@ snapshots: tsscmp@1.0.6: {} + tty-browserify@0.0.1: {} + type-fest@3.13.1: {} type-is@1.6.18: @@ -10224,12 +10902,23 @@ snapshots: escalade: 3.1.2 picocolors: 1.1.1 + update-browserslist-db@1.1.0(browserslist@4.24.0): + dependencies: + browserslist: 4.24.0 + escalade: 3.1.2 + picocolors: 1.1.1 + uri-js@4.4.1: dependencies: punycode: 2.3.1 url-join@4.0.1: {} + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.13.0 + use-callback-ref@1.3.2(@types/react@18.3.11)(react@18.3.1): dependencies: react: 18.3.1 @@ -10247,6 +10936,14 @@ snapshots: util-deprecate@1.0.2: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + utils-merge@1.0.1: {} uvu@0.5.6: @@ -10351,6 +11048,8 @@ snapshots: - supports-color - terser + vm-browserify@1.1.2: {} + w-json@1.3.10: {} watchpack@2.4.2: @@ -10376,7 +11075,7 @@ snapshots: '@webassemblyjs/wasm-parser': 1.12.1 acorn: 8.12.1 acorn-import-attributes: 1.9.5(acorn@8.12.1) - browserslist: 4.23.3 + browserslist: 4.24.0 chrome-trace-event: 1.0.4 enhanced-resolve: 5.17.1 es-module-lexer: 1.5.4 @@ -10402,6 +11101,14 @@ snapshots: dependencies: iconv-lite: 0.6.3 + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + which@1.3.1: dependencies: isexe: 2.0.0 diff --git a/tests/README.md b/tests/README.md index fdbae8ab8..6c6a9089b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,12 +1,12 @@ -# Modern.js Module tests coverage +# Modern.js Module coverage Rslib will try to cover the common scenarios in the [integration test cases of Modern.js Module](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module). This document is used to record the coverage situation. The supported types are divided into three types: "fully supported", "Partial supported", "not supported, but planned to support" and "not supported, not planned to support". -## build +| Fully supported | Partial supported | Will support | Will not support | +| --------------- | ----------------- | ------------ | ---------------- | +| 🟢 | 🟡 | ⚪️ | ⚫️ | -| Supported | Partial supported | Will support | Will not support | -| --------- | ----------------- | ------------ | ---------------- | -| 🟢 | 🟡 | ⚪️ | ⚫️ | +## [build](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/fixtures/build) | Feature | Status | Note | | --------------- | ------ | -------------------------------------------------------- | @@ -44,3 +44,30 @@ Rslib will try to cover the common scenarios in the [integration test cases of M | tsconfigExtends | 🟢 | | | umdGlobals | 🟢 | | | umdModuleName | 🟡 | lacks 1. non string type 2. auto transform to camel case | + +## [dev](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/fixtures/dev) + +Not applicable, Rslib doesn't introduce new plugin system. + +## [platform](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/fixtures/platform) + +Not applicable, the doc tool integrated with Rspress will be implemented decoupled from Rslib. + +## [preset](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/fixtures/preset) + +Not applicable, Rslib will provide a more simple unencapsulated build boilerplate. + +## [plugins](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/plugins) + +Rslib could reuse the plugins from Rsbuild, which means the [official plugins](https://edenx.bytedance.net/module-tools/en/plugins/official-list/overview.html) provided by Modern Module could be replaced by Rsbuild plugins. + +| Plugins | Status | Note | +| -------------------------------------- | ------ | ----------------------------------------------------------------------------- | +| @modern-js/plugin-module-import | 🟢 | Use https://rsbuild.dev/config/source/transform-import#sourcetransformimport. | +| @modern-js/plugin-module-banner | 🟢 | BannerPlugin. | +| @modern-js/plugin-module-node-polyfill | ⚪️ | Use https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill. | +| @modern-js/plugin-module-polyfill | ⚪️ | Use https://rsbuild.dev/config/output/polyfill#outputpolyfill. | +| @modern-js/plugin-module-babel | 🟢 | Use https://rsbuild.dev/plugins/list/plugin-babel. | +| @modern-js/plugin-module-vue | ⚪️ | Use https://rsbuild.dev/plugins/list/plugin-vue. | + +## diff --git a/tests/integration/node-polyfill/bundle-false/package.json b/tests/integration/node-polyfill/bundle-false/package.json new file mode 100644 index 000000000..eeed711a8 --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/package.json @@ -0,0 +1,14 @@ +{ + "name": "node-polyfill-bundle-false-test", + "version": "1.0.0", + "private": true, + "type": "module", + "dependencies": { + "buffer": "^6.0.3", + "core-js": "^3.38.1", + "core-js-pure": "^3.38.1" + }, + "devDependencies": { + "@rsbuild/plugin-node-polyfill": "^1.2.0" + } +} diff --git a/tests/integration/node-polyfill/bundle-false/rslib.config.ts b/tests/integration/node-polyfill/bundle-false/rslib.config.ts new file mode 100644 index 000000000..b7dd56d26 --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/rslib.config.ts @@ -0,0 +1,37 @@ +import { + pluginNodePolyfill, + resolvedPolyfillToModules, +} from '@rsbuild/plugin-node-polyfill'; +import { defineConfig } from '@rslib/core'; +import { generateBundleEsmConfig } from 'test-helper'; + +export default defineConfig({ + lib: [ + generateBundleEsmConfig({ + bundle: false, + source: { + entry: { + index: ['./src/**'], + }, + }, + output: { + externals: Object.entries(resolvedPolyfillToModules).reduce( + (acc, [key, value]) => { + acc[key] = `node-commonjs ${value}`; + return acc; + }, + {} as Record, + ), + distPath: { + root: './dist/esm/bundleless', + }, + }, + }), + ], + plugins: [pluginNodePolyfill()], + source: { + entry: { + index: './src/index.ts', + }, + }, +}); diff --git a/tests/integration/node-polyfill/bundle-false/src/buffer1.ts b/tests/integration/node-polyfill/bundle-false/src/buffer1.ts new file mode 100644 index 000000000..839578246 --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/src/buffer1.ts @@ -0,0 +1 @@ +export const value = Buffer.from('value'); diff --git a/tests/integration/node-polyfill/bundle-false/src/buffer2.ts b/tests/integration/node-polyfill/bundle-false/src/buffer2.ts new file mode 100644 index 000000000..839578246 --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/src/buffer2.ts @@ -0,0 +1 @@ +export const value = Buffer.from('value'); diff --git a/tests/integration/node-polyfill/bundle-false/src/index.ts b/tests/integration/node-polyfill/bundle-false/src/index.ts new file mode 100644 index 000000000..79a2ebf4e --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/src/index.ts @@ -0,0 +1,2 @@ +export { value as value1 } from './buffer1'; +export { value as value2 } from './buffer2'; diff --git a/tests/integration/node-polyfill/bundle-false/tsconfig.json b/tests/integration/node-polyfill/bundle-false/tsconfig.json new file mode 100644 index 000000000..888d3e460 --- /dev/null +++ b/tests/integration/node-polyfill/bundle-false/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@rslib/tsconfig/base", + "compilerOptions": { + "baseUrl": "./" + }, + "include": ["src"] +} diff --git a/tests/integration/node-polyfill/bundle/package.json b/tests/integration/node-polyfill/bundle/package.json new file mode 100644 index 000000000..44c5e2974 --- /dev/null +++ b/tests/integration/node-polyfill/bundle/package.json @@ -0,0 +1,13 @@ +{ + "name": "node-polyfill-bundle-test", + "version": "1.0.0", + "private": true, + "type": "module", + "dependencies": { + "core-js": "^3.38.1", + "core-js-pure": "^3.38.1" + }, + "devDependencies": { + "@rsbuild/plugin-node-polyfill": "^1.2.0" + } +} diff --git a/tests/integration/node-polyfill/bundle/rslib.config.ts b/tests/integration/node-polyfill/bundle/rslib.config.ts new file mode 100644 index 000000000..6edd96393 --- /dev/null +++ b/tests/integration/node-polyfill/bundle/rslib.config.ts @@ -0,0 +1,30 @@ +import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill'; +import { defineConfig } from '@rslib/core'; +import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; + +export default defineConfig({ + lib: [ + generateBundleEsmConfig({ + bundle: true, + output: { + distPath: { + root: './dist/esm/bundle', + }, + }, + }), + generateBundleCjsConfig({ + bundle: true, + output: { + distPath: { + root: './dist/cjs/bundle', + }, + }, + }), + ], + plugins: [pluginNodePolyfill()], + source: { + entry: { + index: './src/index.ts', + }, + }, +}); diff --git a/tests/integration/node-polyfill/bundle/src/buffer1.ts b/tests/integration/node-polyfill/bundle/src/buffer1.ts new file mode 100644 index 000000000..1ec648a27 --- /dev/null +++ b/tests/integration/node-polyfill/bundle/src/buffer1.ts @@ -0,0 +1 @@ +export const value1 = Buffer.from('value'); diff --git a/tests/integration/node-polyfill/bundle/src/buffer2.ts b/tests/integration/node-polyfill/bundle/src/buffer2.ts new file mode 100644 index 000000000..68f4e6eff --- /dev/null +++ b/tests/integration/node-polyfill/bundle/src/buffer2.ts @@ -0,0 +1 @@ +export const value2 = Buffer.from('value'); diff --git a/tests/integration/node-polyfill/bundle/src/index.ts b/tests/integration/node-polyfill/bundle/src/index.ts new file mode 100644 index 000000000..79db4413e --- /dev/null +++ b/tests/integration/node-polyfill/bundle/src/index.ts @@ -0,0 +1,2 @@ +export { value1 } from './buffer1'; +export { value2 } from './buffer2'; diff --git a/tests/integration/node-polyfill/bundle/tsconfig.json b/tests/integration/node-polyfill/bundle/tsconfig.json new file mode 100644 index 000000000..888d3e460 --- /dev/null +++ b/tests/integration/node-polyfill/bundle/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@rslib/tsconfig/base", + "compilerOptions": { + "baseUrl": "./" + }, + "include": ["src"] +} diff --git a/tests/integration/node-polyfill/index.test.ts b/tests/integration/node-polyfill/index.test.ts new file mode 100644 index 000000000..c526d56ba --- /dev/null +++ b/tests/integration/node-polyfill/index.test.ts @@ -0,0 +1,44 @@ +import { join } from 'node:path'; +import { buildAndGetResults } from 'test-helper'; +import { expect, test } from 'vitest'; + +test('`Buffer` should be imported from polyfill when bundled', async () => { + const fixturePath = join(__dirname, './bundle'); + const { entries, entryFiles } = await buildAndGetResults({ fixturePath }); + const bufferRegex = + /var .* = __webpack_require__\(".*\/node_modules\/buffer\/index\.js"\)\["Buffer"\]/g; + + for (const format of ['esm', 'cjs'] as const) { + expect(entries[format].match(bufferRegex)?.length).toBe(2); + const buffer = (await import(entryFiles[format])).value1; + expect(buffer.toString()).toEqual('value'); + } +}); + +test('`Buffer` should be aliased to polyfill packages when bundle is disabled', async () => { + const fixturePath = join(__dirname, './bundle-false'); + const { contents, files } = await buildAndGetResults({ fixturePath }); + + const bufferContents = Object.entries(contents.esm) + .filter(([filename]) => { + return /buffer\d\.js$/.test(filename); + }) + .map(([_, content]) => content); + + for (const content of bufferContents) { + expect(content).toContain( + 'module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer")', + ); + } + + const bufferFiles = files.esm.filter((filename) => { + return /buffer\d\.js$/.test(filename); + }); + + await Promise.all( + bufferFiles.map(async (filename) => { + const buffer = (await import(filename)).value; + expect(buffer.toString()).toBe('value'); + }), + ); +}); From ba30772f3372db734a04188324772d88da23758a Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 22 Oct 2024 16:39:30 +0800 Subject: [PATCH 2/5] fix --- biome.json | 10 ++++++++-- scripts/dictionary.txt | 1 + tests/README.md | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/biome.json b/biome.json index b8cb0eac5..9a198e3d6 100644 --- a/biome.json +++ b/biome.json @@ -21,7 +21,10 @@ "ignoreUnknown": true }, "formatter": { - "ignore": ["**/.rslib/*"], + "ignore": [ + "**/.rslib/*", + "./tests/e2e/react-component/public/umd/index.js" + ], "indentStyle": "space" }, "javascript": { @@ -42,7 +45,10 @@ }, "linter": { "enabled": true, - "ignore": ["./tests/integration/**/*/src/*"], + "ignore": [ + "./tests/integration/**/*/src/*", + "./tests/e2e/react-component/public/umd/index.js" + ], "rules": { "recommended": true, "style": { diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index 6bf19a79c..ac7a20e96 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -126,6 +126,7 @@ tsbuildinfo tsconfck tsdoc tsup +unencapsulated unocss unpatch unplugin diff --git a/tests/README.md b/tests/README.md index 6c6a9089b..1146ff50d 100644 --- a/tests/README.md +++ b/tests/README.md @@ -59,7 +59,7 @@ Not applicable, Rslib will provide a more simple unencapsulated build boilerplat ## [plugins](https://github.com/web-infra-dev/modern.js/tree/main/tests/integration/module/plugins) -Rslib could reuse the plugins from Rsbuild, which means the [official plugins](https://edenx.bytedance.net/module-tools/en/plugins/official-list/overview.html) provided by Modern Module could be replaced by Rsbuild plugins. +Rslib could reuse the plugins from Rsbuild, which means the [official plugins](https://modernjs.dev/en/plugin/plugin-system/introduction.html#official-plugins) provided by Modern Module could be replaced by Rsbuild plugins. | Plugins | Status | Note | | -------------------------------------- | ------ | ----------------------------------------------------------------------------- | From e726bbb6fdabbf3c7b8c25b0ca4d18b0469898ae Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 22 Oct 2024 17:43:56 +0800 Subject: [PATCH 3/5] fix --- pnpm-lock.yaml | 27 +--------- tests/README.md | 2 +- website/docs/en/guide/advanced/_meta.json | 1 + .../docs/en/guide/advanced/node-polyfill.mdx | 52 +++++++++++++++++++ 4 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 website/docs/en/guide/advanced/node-polyfill.mdx diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbef63905..49106453d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2257,11 +2257,6 @@ packages: browserify-zlib@0.2.0: resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} - browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.24.0: resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2778,9 +2773,6 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.15: - resolution: {integrity: sha512-Z4rIDoImwEJW+YYKnPul4DzqsWVqYetYVN3XqDmRpgV0mjz0hYTaeeh+8/9CL1bk3AHYmF4freW/NTiVoXA2gA==} - electron-to-chromium@1.5.40: resolution: {integrity: sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==} @@ -5659,7 +5651,7 @@ snapshots: dependencies: '@babel/compat-data': 7.25.4 '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 + browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 @@ -7388,13 +7380,6 @@ snapshots: dependencies: pako: 1.0.11 - browserslist@4.23.3: - dependencies: - caniuse-lite: 1.0.30001663 - electron-to-chromium: 1.5.15 - node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) - browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001663 @@ -7885,8 +7870,6 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.15: {} - electron-to-chromium@1.5.40: {} elliptic@6.5.7: @@ -10090,7 +10073,7 @@ snapshots: reduce-configs@1.0.0: dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 refractor@3.6.0: dependencies: @@ -10896,12 +10879,6 @@ snapshots: upath@2.0.1: {} - update-browserslist-db@1.1.0(browserslist@4.23.3): - dependencies: - browserslist: 4.23.3 - escalade: 3.1.2 - picocolors: 1.1.1 - update-browserslist-db@1.1.0(browserslist@4.24.0): dependencies: browserslist: 4.24.0 diff --git a/tests/README.md b/tests/README.md index 1146ff50d..0fd2eb55c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -65,7 +65,7 @@ Rslib could reuse the plugins from Rsbuild, which means the [official plugins](h | -------------------------------------- | ------ | ----------------------------------------------------------------------------- | | @modern-js/plugin-module-import | 🟢 | Use https://rsbuild.dev/config/source/transform-import#sourcetransformimport. | | @modern-js/plugin-module-banner | 🟢 | BannerPlugin. | -| @modern-js/plugin-module-node-polyfill | ⚪️ | Use https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill. | +| @modern-js/plugin-module-node-polyfill | 🟢 | Use https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill. | | @modern-js/plugin-module-polyfill | ⚪️ | Use https://rsbuild.dev/config/output/polyfill#outputpolyfill. | | @modern-js/plugin-module-babel | 🟢 | Use https://rsbuild.dev/plugins/list/plugin-babel. | | @modern-js/plugin-module-vue | ⚪️ | Use https://rsbuild.dev/plugins/list/plugin-vue. | diff --git a/website/docs/en/guide/advanced/_meta.json b/website/docs/en/guide/advanced/_meta.json index 381d84627..986f00355 100644 --- a/website/docs/en/guide/advanced/_meta.json +++ b/website/docs/en/guide/advanced/_meta.json @@ -8,6 +8,7 @@ "dts", "module-federation", "module-doc", + "node-polyfill", "storybook", "monorepo" ] diff --git a/website/docs/en/guide/advanced/node-polyfill.mdx b/website/docs/en/guide/advanced/node-polyfill.mdx new file mode 100644 index 000000000..8cb54a742 --- /dev/null +++ b/website/docs/en/guide/advanced/node-polyfill.mdx @@ -0,0 +1,52 @@ +import { Steps, SourceCode } from '@theme'; +import { PackageManagerTabs } from '@theme'; + +# Node Polyfill + +:::tip About Node Polyfill +Normally, we don't need to use Node libs on the browser side. However, it is possible to use some Node libs when the code will run on both the Node side and the browser side, and Node Polyfill provides browser versions of polyfills for these Node libs. +::: + +By using [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), Node core libs polyfills are automatically injected into the browser-side, allowing you to use these modules on the browser side with confidence. + +## Getting Start + + + +### Install plugin + +Rslib uses [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) to provide the Node Polyfill feature. + + + +### Register plugin + +Add the plugin into the plugins field. + +```ts +import { defineConfig } from '@rslib/core'; +import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill'; + +export default defineConfig({ + lib: [{ format: 'esm' }], + plugins: [pluginNodePolyfill()], +}); +``` + +### Setup + +- For projects with `bundle` enabled, the Node Polyfill will be injected and included in the output. +- For projects with `bundle` disabled, polyfills are not injected into the output by default. To avoid inlining the polyfill in every module. The modules are externalized and need to be added to dependencies manually, follow these steps: + + 1. Configure `output.external` with `resolvedPolyfillToModules`, which you can import from [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill). This will externalize the polyfill modules to the installed polyfill dependencies. + 2. Install used polyfill modules as dependencies. + + With the following steps, every usage of the polyfill module will be replaced by the corresponding module in the `externals` field. Checkout the of the example for more details. + + + +### + +## Configurations + +Check out the documentation of [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), all the configurations are applicable for Rslib. From f024df3acd924118753f8110fd2bc13d9f6507b1 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 22 Oct 2024 17:57:28 +0800 Subject: [PATCH 4/5] fix --- pnpm-lock.yaml | 18 ------------------ .../node-polyfill/bundle-false/package.json | 4 +--- .../node-polyfill/bundle/package.json | 4 ---- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49106453d..bde6a3c75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -567,13 +567,6 @@ importers: tests/integration/minify/default: {} tests/integration/node-polyfill/bundle: - dependencies: - core-js: - specifier: ^3.38.1 - version: 3.38.1 - core-js-pure: - specifier: ^3.38.1 - version: 3.38.1 devDependencies: '@rsbuild/plugin-node-polyfill': specifier: ^1.2.0 @@ -584,12 +577,6 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 - core-js: - specifier: ^3.38.1 - version: 3.38.1 - core-js-pure: - specifier: ^3.38.1 - version: 3.38.1 devDependencies: '@rsbuild/plugin-node-polyfill': specifier: ^1.2.0 @@ -2510,9 +2497,6 @@ packages: copy-to-clipboard@3.3.3: resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} - core-js-pure@3.38.1: - resolution: {integrity: sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==} - core-js@3.38.1: resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} @@ -7608,8 +7592,6 @@ snapshots: dependencies: toggle-selection: 1.0.6 - core-js-pure@3.38.1: {} - core-js@3.38.1: {} core-util-is@1.0.3: {} diff --git a/tests/integration/node-polyfill/bundle-false/package.json b/tests/integration/node-polyfill/bundle-false/package.json index eeed711a8..49169afe8 100644 --- a/tests/integration/node-polyfill/bundle-false/package.json +++ b/tests/integration/node-polyfill/bundle-false/package.json @@ -4,9 +4,7 @@ "private": true, "type": "module", "dependencies": { - "buffer": "^6.0.3", - "core-js": "^3.38.1", - "core-js-pure": "^3.38.1" + "buffer": "^6.0.3" }, "devDependencies": { "@rsbuild/plugin-node-polyfill": "^1.2.0" diff --git a/tests/integration/node-polyfill/bundle/package.json b/tests/integration/node-polyfill/bundle/package.json index 44c5e2974..c705b077f 100644 --- a/tests/integration/node-polyfill/bundle/package.json +++ b/tests/integration/node-polyfill/bundle/package.json @@ -3,10 +3,6 @@ "version": "1.0.0", "private": true, "type": "module", - "dependencies": { - "core-js": "^3.38.1", - "core-js-pure": "^3.38.1" - }, "devDependencies": { "@rsbuild/plugin-node-polyfill": "^1.2.0" } From 9b170de193a042f3079929f8dfdf62b3bf716b09 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 22 Oct 2024 19:35:21 +0800 Subject: [PATCH 5/5] remove steps --- website/docs/en/guide/advanced/node-polyfill.mdx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/website/docs/en/guide/advanced/node-polyfill.mdx b/website/docs/en/guide/advanced/node-polyfill.mdx index 8cb54a742..62a16ed42 100644 --- a/website/docs/en/guide/advanced/node-polyfill.mdx +++ b/website/docs/en/guide/advanced/node-polyfill.mdx @@ -9,9 +9,7 @@ Normally, we don't need to use Node libs on the browser side. However, it is pos By using [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), Node core libs polyfills are automatically injected into the browser-side, allowing you to use these modules on the browser side with confidence. -## Getting Start - - +## Getting Started ### Install plugin @@ -21,7 +19,7 @@ Rslib uses [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsb ### Register plugin -Add the plugin into the plugins field. +Then add the plugin into the plugins field. ```ts import { defineConfig } from '@rslib/core'; @@ -43,8 +41,6 @@ export default defineConfig({ With the following steps, every usage of the polyfill module will be replaced by the corresponding module in the `externals` field. Checkout the of the example for more details. - - ### ## Configurations