Giter Club home page Giter Club logo

Comments (8)

kevinswiber avatar kevinswiber commented on August 19, 2024

This might be a good opportunity to just lift the url.js implementation from Node.

https://github.com/joyent/node/blob/master/lib/url.js

It's 700 lines of code, but it's fairly independent. If the runtime punycode implementation is fully Node-compatible, it should be straightforward.

from t1-runtime.

AdamMagaluk avatar AdamMagaluk commented on August 19, 2024

When pulling Node.js version of url it worked great. No issues when running it with colony.

Pushed those changes to my fork if you want to give it a try. AdamMagaluk@78e3d06

from t1-runtime.

AdamMagaluk avatar AdamMagaluk commented on August 19, 2024

Spoke too soon, seems to be breaking on test/net/http-get-query.js after running make colony

from t1-runtime.

kevinswiber avatar kevinswiber commented on August 19, 2024

@AdamMagaluk @tcr @johnnyman727

This looks like a RegExp bug (reference: #107). The problem line is here: https://github.com/joyent/node/blob/master/lib/url.js#L216

It should split the hostname into an array, ['api', 'openweathermap', 'org'], but it looks like String.prototype.split isn't running with 'g' flag logic. The resulting array from the runtime is ['api', 'openweathermap.org']. The .org part gets stripped out as invalid later on in the function.

from t1-runtime.

kevinswiber avatar kevinswiber commented on August 19, 2024

@AdamMagaluk

Confirmed that all tests pass when using Node's url.js and including the fix in PR #110.

from t1-runtime.

AdamMagaluk avatar AdamMagaluk commented on August 19, 2024

Fixed with #111

from t1-runtime.

AdamMagaluk avatar AdamMagaluk commented on August 19, 2024

Reopening this. Added more tests for url.parse that parse local paths like /one/two/three. I also added tests for url.format and url.resolve.

My guess is it's related to some of the regex replacing and matching based on some of the other issues.

Tests here: AdamMagaluk@a7c0235

from t1-runtime.

kevinswiber avatar kevinswiber commented on August 19, 2024

Also, not all of your tests are running due to #126.

from t1-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.