Skip to content

Commit

Permalink
fix: swap country-language to @ladjs/country-language, bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed May 17, 2021
1 parent db97e17 commit 59b8166
Show file tree
Hide file tree
Showing 4 changed files with 1,182 additions and 1,868 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { basename, extname, resolve } = require('path');

const { toASCII } = require('punycode/');

const Boom = require('@hapi/boom');
const debug = require('debug')('ladjs:i18n');
const { I18n } = require('i18n');
Expand All @@ -11,7 +13,6 @@ const { boolean } = require('boolean');
const { getLanguage } = require('country-language');
const { isEmpty, sortBy, every, isFunction } = require('lodash');
const { stringify } = require('qs');
const { toASCII } = require('punycode/');

const punycodedTlds = tlds.map((tld) => toASCII(tld));

Expand All @@ -27,7 +28,7 @@ class I18N {
// Disable signed cookies in NODE_ENV=test
signed: process.env.NODE_ENV !== 'test'
},
expiryMs: 31556952000, // one year in ms
expiryMs: 31_556_952_000, // one year in ms
indent: ' ',
defaultLocale: 'en',
syncFiles: boolean(process.env.I18N_SYNC_FILES || true),
Expand Down
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,38 @@
"shadowgate15 (https://github.com/shadowgate15)"
],
"dependencies": {
"@hapi/boom": "^9.1.1",
"boolean": "3.0.2",
"@hapi/boom": "^9.1.2",
"boolean": "3.0.4",
"country-language": "^0.1.7",
"debug": "^4.3.1",
"i18n": "^0.13.2",
"i18n-locales": "^0.0.4",
"i18n": "^0.13.3",
"i18n-locales": "^0.0.5",
"lodash": "^4.17.21",
"multimatch": "^5.0.0",
"punycode": "^2.1.1",
"qs": "^6.9.6",
"titleize": "^2.1.0",
"tlds": "^1.218.0"
"qs": "^6.10.1",
"titleize": "2",
"tlds": "^1.221.1"
},
"devDependencies": {
"@commitlint/cli": "^12.0.0",
"@commitlint/config-conventional": "^12.0.0",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"ava": "^3.15.0",
"codecov": "^3.8.1",
"codecov": "^3.8.2",
"cross-env": "^7.0.3",
"eslint": "^7.20.0",
"eslint": "^7.26.0",
"eslint-config-xo-lass": "^1.0.5",
"fixpack": "^4.0.0",
"husky": "^5.1.1",
"husky": "^6.0.0",
"koa": "^2.13.1",
"koa-generic-session": "^2.1.1",
"lint-staged": "^10.5.4",
"lint-staged": "^11.0.0",
"nyc": "^15.1.0",
"remark-cli": "^9.0.0",
"remark-preset-github": "^4.0.1",
"sinon": "^9.2.4",
"sinon": "^10.0.0",
"supertest": "^6.1.3",
"xo": "^0.38.1"
"xo": "^0.40.1"
},
"engines": {
"node": ">=8.3.0"
Expand Down Expand Up @@ -117,7 +117,8 @@
"xo-lass"
],
"rules": {
"unicorn/prevent-abbreviations": "off"
"unicorn/prevent-abbreviations": "off",
"unicorn/prefer-module": "off"
}
}
}
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { resolve } = require('path');

const { toASCII } = require('punycode/');
const Koa = require('koa');
const request = require('supertest');
const session = require('koa-generic-session');
const sinon = require('sinon');
const test = require('ava');
const tlds = require('tlds');
const { toASCII } = require('punycode/');

const I18N = require('..');

Expand Down
Loading

0 comments on commit 59b8166

Please sign in to comment.