diff options
author | Rebecca Turner <me@re-becca.org> | 2016-07-08 00:54:49 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-07-08 00:54:50 +0300 |
commit | c7567e58618b63f97884afa104d2f560c9272dd5 (patch) | |
tree | 373d816cfcc3db8d0f2753578982e12fe54e0e5c /node_modules/npm-user-validate | |
parent | ce6406f4b6c4dffbb5cd8a3c049f6663a5665522 (diff) |
npm-user-validate@0.1.5
Lower the username length limits to 214 from 576 to bring in line with registry limits.
Credit: @aredridel
PR-URL: https://github.com/npm/npm-user-validate/pull/9
Diffstat (limited to 'node_modules/npm-user-validate')
-rw-r--r-- | node_modules/npm-user-validate/npm-user-validate.js | 4 | ||||
-rw-r--r-- | node_modules/npm-user-validate/package.json | 40 | ||||
-rw-r--r-- | node_modules/npm-user-validate/test/username.test.js | 10 |
3 files changed, 27 insertions, 27 deletions
diff --git a/node_modules/npm-user-validate/npm-user-validate.js b/node_modules/npm-user-validate/npm-user-validate.js index c9da9cd1c..3a645ec93 100644 --- a/node_modules/npm-user-validate/npm-user-validate.js +++ b/node_modules/npm-user-validate/npm-user-validate.js @@ -4,7 +4,7 @@ exports.username = username var requirements = exports.requirements = { username: { - length: 'Name length must be less than or equal to 576 characters long', + length: 'Name length must be less than or equal to 214 characters long', lowerCase: 'Name must be lowercase', urlSafe: 'Name may not contain non-url-safe chars', dot: 'Name may not start with "."' @@ -28,7 +28,7 @@ function username (un) { return new Error(requirements.username.dot) } - if (un.length > 576) { + if (un.length > 214) { return new Error(requirements.username.length) } diff --git a/node_modules/npm-user-validate/package.json b/node_modules/npm-user-validate/package.json index 84204f8a4..e6707430b 100644 --- a/node_modules/npm-user-validate/package.json +++ b/node_modules/npm-user-validate/package.json @@ -2,50 +2,50 @@ "_args": [ [ { - "raw": "npm-user-validate@latest", + "raw": "npm-user-validate@0.1.5", "scope": null, "escapedName": "npm-user-validate", "name": "npm-user-validate", - "rawSpec": "latest", - "spec": "latest", - "type": "tag" + "rawSpec": "0.1.5", + "spec": "0.1.5", + "type": "version" }, "/Users/rebecca/code/npm" ] ], - "_from": "npm-user-validate@latest", - "_id": "npm-user-validate@0.1.4", + "_from": "npm-user-validate@0.1.5", + "_id": "npm-user-validate@0.1.5", "_inCache": true, "_installable": true, "_location": "/npm-user-validate", "_nodeVersion": "5.11.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/npm-user-validate-0.1.4.tgz_1466105686124_0.06683815410360694" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npm-user-validate-0.1.5.tgz_1466436459441_0.15483755711466074" }, "_npmUser": { "name": "aredridel", "email": "aria@npmjs.com" }, - "_npmVersion": "3.9.6", + "_npmVersion": "3.10.1", "_phantomChildren": {}, "_requested": { - "raw": "npm-user-validate@latest", + "raw": "npm-user-validate@0.1.5", "scope": null, "escapedName": "npm-user-validate", "name": "npm-user-validate", - "rawSpec": "latest", - "spec": "latest", - "type": "tag" + "rawSpec": "0.1.5", + "spec": "0.1.5", + "type": "version" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz", - "_shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz", + "_shasum": "52465d50c2d20294a57125b996baedbf56c5004b", "_shrinkwrap": null, - "_spec": "npm-user-validate@latest", + "_spec": "npm-user-validate@0.1.5", "_where": "/Users/rebecca/code/npm", "author": { "name": "Robert Kowalski", @@ -61,10 +61,10 @@ }, "directories": {}, "dist": { - "shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", - "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz" + "shasum": "52465d50c2d20294a57125b996baedbf56c5004b", + "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz" }, - "gitHead": "ab804940b6846f8cc63f87692cea85b1906c967a", + "gitHead": "688552a47e6c22cd07206894dcd21b9d7a37ee56", "homepage": "https://github.com/npm/npm-user-validate#readme", "keywords": [ "npm", @@ -97,5 +97,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "0.1.4" + "version": "0.1.5" } diff --git a/node_modules/npm-user-validate/test/username.test.js b/node_modules/npm-user-validate/test/username.test.js index 83528eec8..aa0e6b33d 100644 --- a/node_modules/npm-user-validate/test/username.test.js +++ b/node_modules/npm-user-validate/test/username.test.js @@ -22,15 +22,15 @@ test('username may not start with "."', function (t) { t.end() }) -test('username may not be longer than 576 characters', function (t) { - var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-and-a-pickle') +test('username may not be longer than 214 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-and-pickle') t.type(err, 'object') - t.match(err.message, /less than or equal to 576/) + t.match(err.message, /less than or equal to 214/) t.end() }); -test('username may be as long as 576 characters', function (t) { - var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-beef') +test('username may be as long as 214 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-porchetta') t.type(err, 'null') t.end() }); |