diff --git a/app/ldap/server/sync.js b/app/ldap/server/sync.js index 7794fc38c61f..e9ff3a30a45b 100644 --- a/app/ldap/server/sync.js +++ b/app/ldap/server/sync.js @@ -46,7 +46,7 @@ export function slug(text) { if (settings.get('UTF8_Names_Slugify') !== true) { return text; } - text = limax(text, { replacement: '.', separateNumbers: false }); + text = limax(text, { replacement: '.' }); return text.replace(/[^0-9a-z-_.]/g, ''); } diff --git a/app/lib/server/functions/getUsernameSuggestion.js b/app/lib/server/functions/getUsernameSuggestion.js index 0f9b6a5e4302..e7be6544a07f 100644 --- a/app/lib/server/functions/getUsernameSuggestion.js +++ b/app/lib/server/functions/getUsernameSuggestion.js @@ -4,7 +4,7 @@ import { Users } from '../../../models'; import { settings } from '../../../settings'; function slug(text) { - return limax(text, { replacement: '.', separateNumbers: false }).replace(/[^0-9a-z-_.]/g, ''); + return limax(text, { replacement: '.' }).replace(/[^0-9a-z-_.]/g, ''); } function usernameIsAvaliable(username) { diff --git a/package-lock.json b/package-lock.json index 2044969bdb6d..8ce013efdd31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19461,12 +19461,12 @@ } }, "limax": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/limax/-/limax-1.7.0.tgz", - "integrity": "sha512-ibcGylOXT5vry2JKfKwLWx2tZudRYWm4SzG9AE/cc5zqwW+3nQy/uPLUvfAUChRdmqxVrK6SNepmO7ZY8RoKfA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/limax/-/limax-2.0.0.tgz", + "integrity": "sha512-8TQBSG/KH05ATkzi93aQq8MWO2hvkdKn+wlC6q0X7hAeabrVjPd0RqXpQSmsdZhcT3o7PE7O1KXlIjB0KTMdpg==", "requires": { - "hepburn": "^1.1.0", - "pinyin": "^2.8.3", + "hepburn": "^1.1.1", + "pinyin": "^2.9.0", "speakingurl": "^14.0.1" } }, @@ -21821,18 +21821,18 @@ } }, "nodejieba": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.3.0.tgz", - "integrity": "sha512-ZzLsVuNDlrmcBQa/b8G/yegdXje2iFmktYmPksk6qLha1brKEANYqg4XPiBspF1D0y7Npho91KTmvKFcDr0UdA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.3.3.tgz", + "integrity": "sha512-HHLydPGYQawaA2kQnrx/wSM/suvd4efe/7XrVwYhXL2b2SEqO8O7ks0On5Xhc/wQKUp1OTwxKy7BYOwkt3CMgw==", "optional": true, "requires": { - "nan": "~2.10.0" + "nan": "^2.14.0" }, "dependencies": { "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "optional": true } } @@ -22693,9 +22693,9 @@ } }, "pinyin": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/pinyin/-/pinyin-2.8.3.tgz", - "integrity": "sha1-MBzLQ1jM/oAlI8S9ZAphK+5NfEs=", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/pinyin/-/pinyin-2.9.0.tgz", + "integrity": "sha512-TZYQ+2uE12arC1EfCeDmN5KgwIOuNMIweOotKvBZdhVOUuQc5RJsGEGf+BaSvxfVtu9ViYEFJmH0xTaj9t4n3Q==", "requires": { "commander": "~1.1.1", "nodejieba": "^2.2.1", diff --git a/package.json b/package.json index 88040f337e05..6a63d7ca2cc5 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "ldapjs": "^1.0.2", "less": "https://github.com/meteor/less.js/tarball/8130849eb3d7f0ecf0ca8d0af7c4207b0442e3f6", "less-plugin-autoprefixer": "^2.1.0", - "limax": "^1.7.0", + "limax": "^2.0.0", "localforage": "^1.7.3", "lodash.clonedeep": "^4.5.0", "lodash.property": "^4.4.2",