diff --git a/packages/tsurlfilter/package.json b/packages/tsurlfilter/package.json index 5048fe3a5..19bf3fff2 100644 --- a/packages/tsurlfilter/package.json +++ b/packages/tsurlfilter/package.json @@ -102,6 +102,7 @@ "@rollup/plugin-commonjs": "22.0.2", "@rollup/plugin-json": "4.1.0", "@rollup/plugin-node-resolve": "13.3.0", + "@rollup/plugin-terser": "^0.4.3", "@rollup/plugin-typescript": "8.3.4", "@swc/core": "1.4.8", "@swc/jest": "0.2.36", @@ -128,9 +129,8 @@ "rimraf": "3.0.2", "rollup": "2.77.3", "rollup-plugin-cleanup": "3.2.1", - "rollup-plugin-node-globals": "1.4.0", + "rollup-plugin-polyfill-node": "^0.12.0", "rollup-plugin-preserve-shebangs": "0.2.0", - "rollup-plugin-terser": "7.0.2", "tldts-core": "^6.1.13", "ts-node": "^10.9.1", "tslib": "2.4.0", diff --git a/packages/tsurlfilter/rollup.config.ts b/packages/tsurlfilter/rollup.config.ts index c55c77abb..9249303f1 100644 --- a/packages/tsurlfilter/rollup.config.ts +++ b/packages/tsurlfilter/rollup.config.ts @@ -1,11 +1,11 @@ import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; -import globals from 'rollup-plugin-node-globals'; +import nodePolyfills from 'rollup-plugin-polyfill-node'; import camelCase from 'lodash/camelCase'; import typescript from '@rollup/plugin-typescript'; import json from '@rollup/plugin-json'; import cleanup from 'rollup-plugin-cleanup'; -import { terser } from 'rollup-plugin-terser'; +import terser from '@rollup/plugin-terser'; import { preserveShebangs } from 'rollup-plugin-preserve-shebangs'; const DEFAULT_OUTPUT_PATH = 'dist'; @@ -32,7 +32,7 @@ const commonConfig = { commonjs({ sourceMap: false, }), - globals(), + nodePolyfills(), // Allow node_modules resolution, so you can use 'external' to control // which external modules to include in the bundle diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73e548955..eb7f863aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -740,6 +740,9 @@ importers: '@rollup/plugin-node-resolve': specifier: 13.3.0 version: 13.3.0(rollup@2.77.3) + '@rollup/plugin-terser': + specifier: ^0.4.3 + version: 0.4.4(rollup@2.77.3) '@rollup/plugin-typescript': specifier: 8.3.4 version: 8.3.4(rollup@2.77.3)(tslib@2.4.0)(typescript@4.7.4) @@ -818,15 +821,12 @@ importers: rollup-plugin-cleanup: specifier: 3.2.1 version: 3.2.1(rollup@2.77.3) - rollup-plugin-node-globals: - specifier: 1.4.0 - version: 1.4.0 + rollup-plugin-polyfill-node: + specifier: ^0.12.0 + version: 0.12.0(rollup@2.77.3) rollup-plugin-preserve-shebangs: specifier: 0.2.0 version: 0.2.0(rollup@2.77.3) - rollup-plugin-terser: - specifier: 7.0.2 - version: 7.0.2(rollup@2.77.3) tldts-core: specifier: ^6.1.13 version: 6.1.13 @@ -3739,6 +3739,21 @@ packages: rollup: 4.13.0 dev: true + /@rollup/plugin-inject@5.0.5(rollup@2.77.3): + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@2.77.3) + estree-walker: 2.0.2 + magic-string: 0.30.8 + rollup: 2.77.3 + dev: true + /@rollup/plugin-inject@5.0.5(rollup@3.29.4): resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} engines: {node: '>=14.0.0'} @@ -3898,6 +3913,21 @@ packages: smob: 1.4.1 dev: true + /@rollup/plugin-terser@0.4.4(rollup@2.77.3): + resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 2.77.3 + serialize-javascript: 6.0.2 + smob: 1.4.1 + terser: 5.29.2 + dev: true + /@rollup/plugin-terser@0.4.4(rollup@3.29.4): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} @@ -4029,6 +4059,21 @@ packages: rollup: 3.29.4 dev: true + /@rollup/pluginutils@5.1.0(rollup@2.77.3): + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 2.77.3 + dev: true + /@rollup/pluginutils@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -5961,12 +6006,6 @@ packages: engines: {node: '>=0.4.0'} dev: true - /acorn@5.7.4: - resolution: {integrity: sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn@7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -6775,10 +6814,6 @@ packages: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: true - /buffer-es6@4.9.3: - resolution: {integrity: sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw==} - dev: true - /buffer-fill@1.0.0: resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} dev: true @@ -9683,10 +9718,6 @@ packages: engines: {node: '>=4.0'} dev: true - /estree-walker@0.5.2: - resolution: {integrity: sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==} - dev: true - /estree-walker@0.6.1: resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} dev: true @@ -12180,15 +12211,6 @@ packages: string-length: 4.0.2 dev: true - /jest-worker@26.6.2: - resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} - engines: {node: '>= 10.13.0'} - dependencies: - '@types/node': 20.11.30 - merge-stream: 2.0.0 - supports-color: 7.2.0 - dev: true - /jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} @@ -13070,12 +13092,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /magic-string@0.22.5: - resolution: {integrity: sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==} - dependencies: - vlq: 0.2.3 - dev: true - /magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} dependencies: @@ -14780,10 +14796,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /process-es6@0.11.6: - resolution: {integrity: sha512-GYBRQtL4v3wgigq10Pv58jmTbFXlIiTbSfgnNqZLY0ldUPqy1rRxDI5fCjoCpnM6TqmHQI8ydzTBXW86OYc0gA==} - dev: true - /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true @@ -15424,15 +15436,13 @@ packages: rollup: 3.29.4 dev: true - /rollup-plugin-node-globals@1.4.0: - resolution: {integrity: sha512-xRkB+W/m1KLIzPUmG0ofvR+CPNcvuCuNdjVBVS7ALKSxr3EDhnzNceGkGi1m8MToSli13AzKFYH4ie9w3I5L3g==} + /rollup-plugin-polyfill-node@0.12.0(rollup@2.77.3): + resolution: {integrity: sha512-PWEVfDxLEKt8JX1nZ0NkUAgXpkZMTb85rO/Ru9AQ69wYW8VUCfDgP4CGRXXWYni5wDF0vIeR1UoF3Jmw/Lt3Ug==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 dependencies: - acorn: 5.7.4 - buffer-es6: 4.9.3 - estree-walker: 0.5.2 - magic-string: 0.22.5 - process-es6: 0.11.6 - rollup-pluginutils: 2.8.2 + '@rollup/plugin-inject': 5.0.5(rollup@2.77.3) + rollup: 2.77.3 dev: true /rollup-plugin-polyfill-node@0.12.0(rollup@3.29.4): @@ -15462,19 +15472,6 @@ packages: rollup: 3.29.4 dev: true - /rollup-plugin-terser@7.0.2(rollup@2.77.3): - resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser - peerDependencies: - rollup: ^2.0.0 - dependencies: - '@babel/code-frame': 7.24.2 - jest-worker: 26.6.2 - rollup: 2.77.3 - serialize-javascript: 4.0.0 - terser: 5.29.2 - dev: true - /rollup-pluginutils@2.8.2: resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} dependencies: @@ -15717,12 +15714,6 @@ packages: - supports-color dev: true - /serialize-javascript@4.0.0: - resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} - dependencies: - randombytes: 2.1.0 - dev: true - /serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} dependencies: @@ -17351,10 +17342,6 @@ packages: extsprintf: 1.3.0 dev: true - /vlq@0.2.3: - resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} - dev: true - /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true