Browse Source

Don't use domain-regex

It's broken, it doesn't match what you think it will match.
master
Olli Vanhoja 8 years ago
parent
commit
74adb7b613
  1. 3
      lib/alias.js
  2. 3
      lib/domains.js
  3. 1
      package.json

3
lib/alias.js

@ -2,11 +2,10 @@ import Now from './';
import toHost from './to-host';
import chalk from 'chalk';
import isZeitWorld from './is-zeit-world';
import _domainRegex from 'domain-regex';
import { DOMAIN_VERIFICATION_ERROR } from './errors';
import { resolve4 } from './dns';
const domainRegex = _domainRegex();
const domainRegex = /^((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/;
export default class Alias extends Now {

3
lib/domains.js

@ -1,10 +1,9 @@
import Now from '../lib';
import isZeitWorld from './is-zeit-world';
import _domainRegex from 'domain-regex';
import chalk from 'chalk';
import { DNS_VERIFICATION_ERROR } from './errors';
const domainRegex = _domainRegex();
const domainRegex = /^((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/;
export default class Domains extends Now {

1
package.json

@ -63,7 +63,6 @@
"copy-paste": "1.3.0",
"cross-spawn-async": "2.2.4",
"docker-file-parser": "0.1.0",
"domain-regex": "0.0.1",
"email-prompt": "0.1.8",
"email-validator": "1.0.4",
"fs-promise": "0.5.0",

Loading…
Cancel
Save