breautek opened a new issue, #1290: URL: https://github.com/apache/cordova-ios/issues/1290
# Bug Report ## Problem Unit test fails on NodeJS 18, because the values returned by `URL.parse` has changed in NodeJS 18. https://github.com/apache/cordova-ios/blame/master/lib/prepare.js#L1029 As of NodeJS 18, the parsed URL now contains ` .hostname` property that is a non-empty string, whereas older Node versions returned `hosname` as an empty string, when given a URL that contains a wildcard such as `https://*.test.com`. Here is a summary of how the parsed URL has changed going into Node 18. ``` v16.14.0 -> v18.14.1 var URL = require('url') var href = 'http://*.test'; Url { protocol: 'http:', slashes: true, auth: null, host: '',----------------> '*.test' port: null, hostname: '',------------> '*.test' hash: null, search: null, query: null, pathname: '/*.test',-----> '/' path: '/*.test',---------> '/' href: 'http:///*.test'---> 'http://*.test/' } ``` As a result, the final object when testing https://github.com/apache/cordova-ios/blame/master/tests/spec/unit/prepare.spec.js#L864 fails because the key is `*.server01.com` instead of the expected `server01.com` ### Version information cordova-ios master NodeJS 18 <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> -- 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]
