On Fri, Mar 27, 2020 at 5:20 pm, Pirate Praveen
<[email protected]> 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.
--
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel