Skip to content

Commit

Permalink
Minimum supported Node.js version is now 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Sep 27, 2019
1 parent ce2e7d2 commit 3f5f3b5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ matrix:
- os: linux
dist: trusty
sudo: false
node_js: "6"
node_js: "8"
- os: linux
dist: trusty
sudo: false
node_js: "8"
node_js: "10"
- os: linux
dist: trusty
sudo: false
node_js: "10"
- os: osx
osx_image: xcode9.2
node_js: "6"
node_js: "12"
- os: osx
osx_image: xcode9.2
node_js: "8"
- os: osx
osx_image: xcode9.2
node_js: "10"
- os: osx
osx_image: xcode9.2
node_js: "12"
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ build: off
platform: x64
environment:
matrix:
- nodejs_version: "6"
nodejs_arch: "x86"
- nodejs_version: "6"
nodejs_arch: "x64"
- nodejs_version: "8"
nodejs_arch: "x86"
- nodejs_version: "8"
Expand All @@ -16,6 +12,10 @@ environment:
nodejs_arch: "x86"
- nodejs_version: "10"
nodejs_arch: "x64"
- nodejs_version: "12"
nodejs_arch: "x86"
- nodejs_version: "12"
nodejs_arch: "x64"
install:
- ps: Install-Product node $env:nodejs_version $env:nodejs_arch
- npm install
Expand Down
4 changes: 2 additions & 2 deletions lib/limax.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function (text, opt) {
: opt || {};

// Remove apostrophes contained within a word
text = text.replace(/(\S)['\u2018\u2019\u201A\u201B\u2032\u2035\u0301](\S)/g, '$1$2');
text = text.replace(/(\S)['\u2018\u2019\u201A\u201B\u2032\u2035\u0301](\S)/g, '$1$2'); // eslint-disable-line no-misleading-character-class

// Break out any numbers contained within a word
if (options.separateNumbers !== false) {
Expand All @@ -37,7 +37,7 @@ module.exports = function (text, opt) {
const tone = (typeof options.tone === 'boolean') ? options.tone : true;
mergeDigitSuffixes = tone;
text = pinyin(text, {
'style': tone ? pinyin.STYLE_TONE2 : pinyin.STYLE_NORMAL
style: tone ? pinyin.STYLE_TONE2 : pinyin.STYLE_NORMAL
}).join(' ');
// Remove punctuation symbols
const customNonPunctuation = customCharsAsArray(options.custom).map(function (c) { return `\\${c}`; }).join('');
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "git://github.com/lovell/limax"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "semistandard && nyc --reporter=html ava"
Expand Down Expand Up @@ -39,13 +39,13 @@
],
"license": "Apache-2.0",
"dependencies": {
"hepburn": "^1.1.0",
"pinyin": "^2.8.3",
"hepburn": "^1.1.1",
"pinyin": "^2.9.0",
"speakingurl": "^14.0.1"
},
"devDependencies": {
"ava": "^0.25.0",
"nyc": "^13.0.1",
"semistandard": "^12.0.1"
"ava": "^2.4.0",
"nyc": "^14.1.1",
"semistandard": "^14.2.0"
}
}
8 changes: 4 additions & 4 deletions test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const tests = {
'i ♥ latin': 'i-love-latin',
'Я люблю русский': 'ya-lyublyu-russkii',
'私は ひらがな が大好き': 'ha-hiragana-gaki',
'我爱官话': 'wo3-ai4-guan1-hua4',
'one2three': 'one-2-three',
我爱官话: 'wo3-ai4-guan1-hua4',
one2three: 'one-2-three',
'The User\'s Guide': 'the-users-guide',
'The User’s Guide': 'the-users-guide',
'弄堂里的菜品赤醬': 'nong4-tang2-li3-de-cai4-pin3-chi4-jiang4',
'12345': '12345',
弄堂里的菜品赤醬: 'nong4-tang2-li3-de-cai4-pin3-chi4-jiang4',
12345: '12345',
'one 2three': 'one-2three',
'Pop brésilienne header': 'pop-bresilienne-header'
};
Expand Down

0 comments on commit 3f5f3b5

Please sign in to comment.