Coder Social home page Coder Social logo

universal-url-lite's Introduction

universal-url-lite NPM Version Build Status Dependency Monitor

A smaller Universal WHATWG URL, for Browserify/etc.

The universal-url package bundles to 392kB (99kB gzipped). This package exists to compile the same to a smaller file size via custom optimizations.

This package is not meant to be required/imported directly. It should be added to your browser build process as an alias.

Installation

Node.js >= 6 is required. To install, type this at the command line:

npm install universal-url-lite

Default Shim File Size File Size

Usage:

"browser": {
  "universal-url": "universal-url-lite"
}

File size optimizations have been made, particularly the near-complete exclusion of the TR46 implementation. Functionality is essentially the same as the universal-url package, with the exception of IDNA validation and normalization. If a URL contains a hostname with any of the ~4500 Unicode characters requiring a specific casefold, comparison will produce false negatives. Consider this example:

const url1 = new URL('http://ㅼㅼㅼ/');
const url2 = new URL('http://ᄯᄯᄯ/');

console.log(url1.hostname === url2.hostname);
//-> false -- which is incorrect

With invalid IDNAs passing through without error, you will instead need to rely on errors produced by XMLHttpRequest/fetch to know that such URLs are unreachable.

Note: You will need to exclude this browser shim from bundle parsing since it has already been compiled. Browserify has the --noparse CLI option and Webpack has the noParse package.json key.

browserify in.js --outfile=out.js --noparse='/project/node_modules/universal-url-lite/lite.js'

"Native" Shim File Size

This actually includes no shim at all for browser builds. Only the latest browsers will be supported.

Usage:

"browser": {
  "universal-url": "universal-url-lite/native"
}

universal-url-lite's People

Contributors

francoiscote avatar stevenvachon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

universal-url-lite's Issues

TypeError: _universalUrl.URL is not a constructor

@stevenvachon

I was using previously whatwg-url and I try to reduce the overall size of my dapp.

1 - No issue to switch from whatwg-url to universal-url.
My DApp is running correctly and the tests are running.

2 - I added the recommended snippet:

  "browser": {
    "universal-url": "universal-url-lite/native"
  },

in my package.json and tried to build.
It's crashing with the following output :

Error executing boot module $:/plugins/ipfs/ipfs-uri.js: {}

$:/plugins/ipfs/ipfs-uri.js:881
  var defaultApiUrl = new _universalUrl.URL("https://ipfs.infura.io:5001");
                      ^

TypeError: _universalUrl.URL is not a constructor
    at $:/plugins/ipfs/ipfs-uri.js:881:23
    at Object.<anonymous> ($:/plugins/ipfs/ipfs-uri.js:1032:3)
    at Object.7.@babel/runtime/helpers/asyncToGenerator ($:/plugins/ipfs/ipfs-uri.js:1034:4)
    at o ($:/plugins/ipfs/ipfs-uri.js:1:632)
    at r ($:/plugins/ipfs/ipfs-uri.js:1:798)
    at $:/plugins/ipfs/ipfs-uri.js:1:827
    at $:/plugins/ipfs/ipfs-uri.js:1:88
    at $:/plugins/ipfs/ipfs-uri.js:1:323
    at Script.runInContext (vm.js:133:20)
    at Script.runInNewContext (vm.js:139:17)

Not sure where this error is coming. Any help will be greatly appreciated.

3 -Do you have any plan to upgrade the whatwg-url version you are using ?

4 - Here is the project I try to migrate.

https://github.com/xmaysonnave/tiddlywiki-ipfs

Thanks

An in-range update of gzip-size is breaking the build 🚨

The devDependency gzip-size was updated from 5.0.0 to 5.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

gzip-size is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v5.1.0

v5.0.0...v5.1.0

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.5.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.4.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes free-as-in-freezing

3.5.0 / 2017-07-31

📰 News

  • Mocha now has a code of conduct (thanks @kungapal!).
  • Old issues and PRs are now being marked "stale" by Probot's "Stale" plugin. If an issue is marked as such, and you would like to see it remain open, simply add a new comment to the ticket or PR.
  • WARNING: Support for non-ES5-compliant environments will be dropped starting with version 4.0.0 of Mocha!

🔒 Security Fixes

🎉 Enhancements

  • #2696: Add --forbid-only and --forbid-pending flags. Use these in CI or hooks to ensure tests aren't accidentally being skipped! (@charlierudolph)
  • #2813: Support Node.js 8's --napi-modules flag (@jupp0r)

🔩 Other

Commits

The new version differs by 34 commits.

  • 82d879f Release v3.5.0
  • bf687ce update mocha.js for v3.5.0
  • ec73c9a update date for release of v3.5.0 in CHANGELOG [ci skip]
  • 1ba2cfc update CHANGELOG.md for v3.5.0 [ci skip]
  • 065e14e remove custom install script from travis (no longer needed)
  • 4e87046 update karma-sauce-launcher URL for npm@5
  • 6886ccc increase timeout for slow-grepping test
  • 2408d90 Make dependencies use older version of readable-stream to work around incompatibilities introduced by 2.3.0 on June 19th
  • 68a1466 Try not clearing the env for debug in the integration test and see if that fixes Node 0.10 on AppVeyor; if need be, some other fix/workaround can be applied to handle whatever was up with debug without causing this issue
  • 958fbb4 Update new tests to work in browser per test hierarchy reorganization
  • 1df7c94 Merge pull request #2704 from seppevs/increase_test_coverage_of_mocha_js
  • 1f270cd Stop timing out (#2889)
  • 27c7496 upgrade to [email protected]; closes #2859 (#2860)
  • 50fc47d fix CI; closes #2867 (#2868)
  • 1b1377c Add test for ignoreLeaks and fix descriptions

There are 34 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of puppeteer is breaking the build 🚨

Version 1.6.2 of puppeteer was just published.

Branch Build failing 🚨
Dependency puppeteer
Current Version 1.6.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

puppeteer is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v1.6.2

Big Changes

  • Chromium 69.0.3494.0 (r575458)

API changes

No API changes.

Bug Fixes

  • #2970 - There are some missing responses on 'page.on("response") when I invoke 'page.goto()'

Raw notes

ed52acc - chore: mark version v1.6.2
c0d8b3b - test: add test with request interception and cookies (#2988)
2f059bf - fix(NetworkManager): Remove header 'cookie' from request hash (#2954)

Commits

The new version differs by 3 commits.

  • ed52acc chore: mark version v1.6.2
  • c0d8b3b test: add test with request interception and cookies (#2988)
  • 2f059bf fix(NetworkManager): Remove header 'cookie' from request hash (#2954)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of punycode is breaking the build 🚨

Version 2.1.1 of punycode was just published.

Branch Build failing 🚨
Dependency punycode
Current Version 2.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

punycode is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of browserify is breaking the build 🚨

The dependency browserify was updated from 16.3.0 to 16.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

browserify is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 5 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of uglify-js is breaking the build 🚨

Version 3.3.26 of uglify-js was just published.

Branch Build failing 🚨
Dependency uglify-js
Current Version 3.3.25
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.3.26

 

Commits

The new version differs by 3 commits.

  • c14d09b v3.3.26
  • 4fc39d8 fix corner case in collapse_vars (#3139)
  • 0b7c70f Update README.md to clarify --source-map filename option (#3137)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of puppeteer is breaking the build 🚨

Version 1.8.0 of puppeteer was just published.

Branch Build failing 🚨
Dependency puppeteer
Current Version 1.7.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

puppeteer is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v1.8.0

Big Changes

API Changes

Changed:

  • PUPPETEER_CHROMIUM_REVISION and PUPPETEER_EXECUTABLE_PATH environment variables will now not only affect puppeteer installation but your scripts as well. (28d9211)
  • page.goto now accepts a referer argument. (cbce839)

Added:

Bug Fixes

  • #317 - Response improvements
  • #846 - How to catch a "Permission request" dialog event?
  • #1077 - Support for geolocation mock?
  • #1159 - ignoreHTTPSErrors is not working when request interception is on
  • #2171 - Can I get Remote Address with puppteer?
  • #2764 - Some URLs sequence makes next responses to be null
  • #2925 - puppeteer@next is not autoupdated
  • #3090 - Referrer should be parameter, not extra header
  • #3106 - Calling a exposed function inside an evaluateOnNewDocument function does not work on Chrome 70

Raw Notes

42fde9b - chore: another attempt to fix pptr@next (#3210)
b7e922b - chore: fix puppeteer@next race condition (#3209)
f230722 - refactor: avoid dynamic requires in lib/ folder (#3208)
d54c7ed - fix(page): Page.goto should properly handle historyAPI in beforeunload (#3198)
28d9211 - feat(puppeteer): support convenience env variables (#3190)
7f9e276 - feat(network): introduce Response.statusText() (#3193)
84c2621 - refactor(network): Create Request class right away from payload (#3194)
7db4f0f - chore: preserve links to master version of API from README.md (#3197)
3364659 - docs(api.md): Added cutoff values for scale option in page.pdf function (#3201)
e07567f - docs(api.md): fix a typo (#3196)
1ba2b85 - feat(network): introduce Response.remoteAddress() (#3192)
52cf16c - refactor(network): Create Response class right away from payload (#3191)
22c0ce6 - test: cleanup newly added test for navigation referer (#3179)
2de5a42 - docs(api.md): expand on puppeteer-core vs puppeteer (#3189)
93f267b - docs(api.md): re-factor api.md heading (#3185)
cbce839 - docs(api.md): small typo (#3188)
32c0363 - feat(chromium): roll Chromium to r588429 (#3181)
464f3b4 - feat(page): Add 'referer' as a parameter to Page.goto() (#3128)
1702928 - feat(page): Introduce page.setGeolocation method (#3160)
1000997 - docs(api.md): page.hover typo (#3165)
50d6c2d - feat(browsercontext): implement BrowserContext.overridePermissions (#3159)
df459ba - feat(chromium): roll Chromium to r587164 (#3153)
bfed64f - docs(readme.md): change Megabits to Megabytes.
3d7ae2a - fix: fix null-type bugs (#3137)
d1105af - Revert "Add Puppeteer Recorder extension to docs" (#3102)
ce64ae2 - test: add test for request interception with 302 after POST (#3105)
d6eb3b4 - refactor: drop object factory from execution context (#3099)
73c43be - docs: Add Puppeteer Recorder extension to docs (#3088)
395c506 - docs(troubleshooting): add libatk-bridge2.0-0 to ubuntu dependencies (#3096)
ce78327 - feat(chromium): roll Chromium to r583214 (#3092)
b8e0d62 - docs(readme): refer to awesome-puppeteer (#3062)
3ae85e4 - docs: mention puppeteer-core (#3061)
af361c8 - chore: bump version to v1.7.0-post (#3060)

Commits

The new version differs by 34 commits.

  • aeb6a99 chore: mark version v1.8.0 (#3211)
  • 42fde9b chore: another attempt to fix pptr@next (#3210)
  • b7e922b chore: fix puppeteer@next race condition (#3209)
  • f230722 refactor: avoid dynamic requires in lib/ folder (#3208)
  • d54c7ed fix(page): Page.goto should properly handle historyAPI in beforeunload (#3198)
  • 28d9211 feat(puppeteer): support convenience env variables (#3190)
  • 7f9e276 feat(network): introduce Response.statusText() (#3193)
  • 84c2621 refactor(network): Create Request class right away from payload (#3194)
  • 7db4f0f chore: preserve links to master version of API from README.md (#3197)
  • 3364659 docs(api.md): Added cutoff values for scale option in page.pdf function (#3201)
  • e07567f docs(api.md): fix a typo (#3196)
  • 1ba2b85 feat(network): introduce Response.remoteAddress() (#3192)
  • 52cf16c refactor(network): Create Response class right away from payload (#3191)
  • 22c0ce6 test: cleanup newly added test for navigation referer (#3179)
  • 2de5a42 docs(api.md): expand on puppeteer-core vs puppeteer (#3189)

There are 34 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of uglify-js is breaking the build 🚨

Version 3.0.27 of uglify-js just got published.

Branch Build failing 🚨
Dependency uglify-js
Current Version 3.0.26
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As uglify-js is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.0.27

 

Commits

The new version differs by 3 commits.

  • c4c2ef4 v3.0.27
  • a845897 improve mangle.properties (#2261)
  • 32ea2c5 issue template: describe acceptable JS input (#2255)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The dependency @babel/core was updated from 7.4.5 to 7.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of common-shakeify is breaking the build 🚨

Version 0.5.1 of common-shakeify was just published.

Branch Build failing 🚨
Dependency common-shakeify
Current Version 0.5.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

common-shakeify is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v0.5.1
  • Fix file names in source maps. (#16)
Commits

The new version differs by 2 commits.

  • 4d58258 0.5.1
  • 446ce81 fix input.js file entries in source maps (#16)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.