* Adjusted the url package common code to encode nested objects and arrays properly (to help address #5065).
* Adjusted to make sure a 'hasOwnProperty' param name is handled.
This code was reverted in 32140c8707 as part of a larger revert, but this particular change should actually remain since it is how modules-runtime@0.7.8 was and is published. I had initially thought that this commit would also be rolled back (and result in a 0.7.9) but that did not yield the desired result.
`modules-runtime@0.7.8` was already released but this part of the commit was included in a larger commit which was reverted. This simply puts the version in-line with the `devel` branch.
Previously, when building a JavaScript bundle for the client, if a
package.json file had a string-valued "browser" field, we would replace
the value of the "main" field of the bundled package.json module with the
value of the "browser" field. This trick was important because it allowed
an npm package to have a different entry point on the client than it had
on the server.
However, that approach became inconsistent if the package.json file was
also explicitly imported as a module, because the package.json stub used
for module resolution prevented the real contents of package.json from
getting bundled, and disagreed with the original package.json module about
the value of the "main" field.
To resolve that inconsistency, it seems better to avoid modifying the
"main" field of package.json modules, and instead rely on the runtime
module system to make sense of the "browser" field, regardless of whether
the package.json module is a stub used only for module resolution or
contains the full contents of the original package.json file.
The ability to understand "browser" fields of package.json modules was
introduced in install@0.8.3:
377d1a3b51
This is potentially a backwards-incompatible change for developers using
this version of `ImportScanner` and `Resolver` who have not yet upgraded
their `modules-runtime` package to at least version 0.7.8. The solution is
to upgrade `modules-runtime`, though it would be nice to enforce that
better somehow.