[Pkg-javascript-devel] Bug#927254: Bug#927254: Bug#927254: closed by Xavier Guimard <yadd at debian.org> (Bug#927254: fixed in vue-router.js 3.0.7+ds-1)

Pirate Praveen praveen at onenetbeyond.org
Fri Mar 27 12:52:23 GMT 2020



On Fri, Mar 27, 2020 at 5:20 pm, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> I can see in dist/vue-router.js
> 
>  var ref = require("path-to-regexp");
>  var pathToRegexp = ref.pathToRegexp;
> 
> and in package.json "path-to-regexp": "^1.7.0",
> 
> where as we have 6.1.0-2

and exports are different between the versions

in 1.7.0 we have

module.exports = pathToRegexp
module.exports.parse = parse
module.exports.compile = compile
module.exports.tokensToFunction = tokensToFunction
module.exports.tokensToRegExp = tokensToRegExp

and in 6.1.0

export function pathToRegexp(path, keys, options) {
    if (path instanceof RegExp)
        return regexpToRegexp(path, keys);
    if (Array.isArray(path))
        return arrayToRegexp(path, keys, options);
    return stringToRegexp(path, keys, options);
}

So these two files need to be patched to match the new exports.

src/create-route-map.js:import Regexp from 'path-to-regexp'
src/util/params.js:import Regexp from 'path-to-regexp'

I have created a patch (replaced current patch to adapt to 
path-to-regexp) and pushed to master. Please test and confirm.



More information about the Pkg-javascript-devel mailing list