TylerBreau commented on issue #1290:
URL: https://github.com/apache/cordova-ios/issues/1290#issuecomment-1443888871

   The code mentions URL.parse being deprecated.
   ```
   function parseAllowlistUrlForATS (url, options) {
       // @todo 'url.parse' was deprecated since v11.0.0. Use 'url.URL' 
constructor instead.
       const href = URL.parse(url); // eslint-disable-line
   ```
   
   Here's a summary of the differences between URL.parse and URL.URL 
constructor.
   ```
   v16.14.0 (URL.parse) -> v18.14.1 (new URL.URL)
   
   var URL = require('url')
   var href = 'http://*.test';
   URL.parse -> new URL.URL(href)
   Url {
    protocol: 'http:',
    slashes: true,-----------> undefined
    auth: null,--------------> undefined
    host: '',----------------> '*.test'
    port: null,
    hostname: '',------------> '*.test'
    hash: null,
    search: null,
    query: null,-------------> undefined
    pathname: '/*.test',-----> '/'
    path: '/*.test',---------> undefined
    href: 'http:///*.test'---> 'http://*.test/'
   
   
    v18 introduces the following properties
    origin: 'http://*.test',
    username: '',
    password: '',
    searchParams: URLSearchParams {},
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to