Commit f768886
committed
feat(webpack): migrate from deprecated url.parse() to WHATWG URL API
Replace the deprecated url.parse() and url.format() methods with the modern WHATWG URL API in PostCSS CLI resources plugins to resolve security and maintainability concerns.
- Replace url.parse(inputUrl) with new URL(normalizedUrl, 'file:///')
- Replace url.format({ pathname, hash, search }) with simple string concatenation
- Replace url.resolve(deployUrl, outputUrl) with new URL(outputUrl, deployUrl).href
- Apply changes consistently across webpack, rspack, and angular-rspack packages
The deprecated url.parse() method is prone to security vulnerabilities and is not standardized. WHATWG URL API provides a modern, secure, and standardized way to parse URLs while maintaining all existing functionality.
Resolves deprecation warnings about url.parse() security implications.1 parent 731e037 commit f768886
File tree
3 files changed
+15
-9
lines changed- packages
- angular-rspack/src/lib/utils
- rspack/src/plugins/utils/plugins
- webpack/src/utils/webpack/plugins
3 files changed
+15
-9
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | | - | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | | - | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | | - | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
0 commit comments