Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2016-01-07 03:12:55 +0300
committerRebecca Turner <me@re-becca.org>2016-01-07 04:21:08 +0300
commit5b820c4e17c907fa8c23771c0cd8e74dd5fdaa51 (patch)
treece7add05062a5bd0ac7de1aba442407a01814c52 /node_modules/has-unicode
parent66bfbcc8b92af72375200cac1f11acd0f1c81088 (diff)
has-unicode@2.0.0
Change the default on windows to be false, as international windows installs often install to non-unicode codepages and there's no way to detect this short of a system call or a call to a command line program. Credit: @iarna
Diffstat (limited to 'node_modules/has-unicode')
-rw-r--r--node_modules/has-unicode/README.md9
-rw-r--r--node_modules/has-unicode/index.js10
-rw-r--r--node_modules/has-unicode/package.json92
-rw-r--r--node_modules/has-unicode/test/index.js2
4 files changed, 73 insertions, 40 deletions
diff --git a/node_modules/has-unicode/README.md b/node_modules/has-unicode/README.md
index e9d3cc326..5a03e5991 100644
--- a/node_modules/has-unicode/README.md
+++ b/node_modules/has-unicode/README.md
@@ -26,9 +26,12 @@ If you have a UTF-16 locale then you won't be detected as unicode capable.
### Windows
-Since at least Windows 7, `cmd` and `powershell` have been unicode capable.
-As such, we report any Windows installation as unicode capable.
-
+Since at least Windows 7, `cmd` and `powershell` have been unicode capable,
+but unfortunately even then it's not guaranteed. In many localizations it
+still uses legacy code pages and there's no facility short of running
+programs or linking C++ that will let us detect this. As such, we
+report any Windows installation as NOT unicode capable, and recommend
+that you encourage your users to override this via config.
### Unix Like Operating Systems
diff --git a/node_modules/has-unicode/index.js b/node_modules/has-unicode/index.js
index e0907b510..9bf537b1c 100644
--- a/node_modules/has-unicode/index.js
+++ b/node_modules/has-unicode/index.js
@@ -2,9 +2,13 @@
var os = require("os")
var hasUnicode = module.exports = function () {
- // Supported Win32 platforms (>XP) support unicode in the console, though
- // font support isn't fantastic.
- if (os.type() == "Windows_NT") { return true }
+ // Recent Win32 platforms (>XP) CAN support unicode in the console but
+ // don't have to, and in non-english locales often use traditional local
+ // code pages. There's no way, short of windows system calls or execing
+ // the chcp command line program to figure this out. As such, we default
+ // this to false and encourage your users to override it via config if
+ // appropriate.
+ if (os.type() == "Windows_NT") { return false }
var isUTF8 = /[.]UTF-8/
if (isUTF8.test(process.env.LC_ALL)
diff --git a/node_modules/has-unicode/package.json b/node_modules/has-unicode/package.json
index 3f0aa0581..924e3b7a0 100644
--- a/node_modules/has-unicode/package.json
+++ b/node_modules/has-unicode/package.json
@@ -1,53 +1,79 @@
{
- "name": "has-unicode",
- "version": "1.0.1",
- "description": "Try to guess if your terminal supports unicode",
- "main": "index.js",
- "scripts": {
- "test": "tap test/*.js"
+ "_args": [
+ [
+ "has-unicode@2.0.0",
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "has-unicode@2.0.0",
+ "_id": "has-unicode@2.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/has-unicode",
+ "_nodeVersion": "4.2.2",
+ "_npmUser": {
+ "email": "me@re-becca.org",
+ "name": "iarna"
},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/has-unicode.git"
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "has-unicode",
+ "raw": "has-unicode@2.0.0",
+ "rawSpec": "2.0.0",
+ "scope": null,
+ "spec": "2.0.0",
+ "type": "version"
},
- "keywords": [
- "unicode",
- "terminal"
+ "_requiredBy": [
+ "/"
],
+ "_resolved": "file:../has-unicode",
+ "_shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3",
+ "_shrinkwrap": null,
+ "_spec": "has-unicode@2.0.0",
+ "_where": "/Users/rebecca/code/npm",
"author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
+ "email": "me@re-becca.org",
+ "name": "Rebecca Turner"
},
- "license": "ISC",
"bugs": {
"url": "https://github.com/iarna/has-unicode/issues"
},
- "homepage": "https://github.com/iarna/has-unicode",
+ "dependencies": {},
+ "description": "Try to guess if your terminal supports unicode",
"devDependencies": {
- "require-inject": "^1.1.1",
- "tap": "^0.4.13"
- },
- "gitHead": "d4ad300c67b25c197582e42e936ea928f7935d01",
- "_id": "has-unicode@1.0.1",
- "_shasum": "c46fceea053eb8ec789bffbba25fca52dfdcf38e",
- "_from": "has-unicode@>=1.0.1 <1.1.0",
- "_npmVersion": "3.3.6",
- "_nodeVersion": "4.1.1",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
+ "require-inject": "^1.3.0",
+ "tap": "^2.3.1"
},
+ "directories": {},
"dist": {
- "shasum": "c46fceea053eb8ec789bffbba25fca52dfdcf38e",
- "tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz"
+ "shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3",
+ "tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-2.0.0.tgz"
},
+ "gitHead": "fdd5de141a5564bdb5bc991d951209da40f6a598",
+ "homepage": "https://github.com/iarna/has-unicode",
+ "keywords": [
+ "terminal",
+ "unicode"
+ ],
+ "license": "ISC",
+ "main": "index.js",
"maintainers": [
{
"name": "iarna",
"email": "me@re-becca.org"
}
],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "name": "has-unicode",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/has-unicode.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "2.0.0"
}
diff --git a/node_modules/has-unicode/test/index.js b/node_modules/has-unicode/test/index.js
index 2394c14ef..cbdfda335 100644
--- a/node_modules/has-unicode/test/index.js
+++ b/node_modules/has-unicode/test/index.js
@@ -7,7 +7,7 @@ test("Windows", function (t) {
var hasUnicode = requireInject("../index.js", {
os: { type: function () { return "Windows_NT" } }
})
- t.is(hasUnicode(), true, "Windows is assumed to be unicode aware")
+ t.is(hasUnicode(), false, "Windows is assumed NOT to be unicode aware")
})
test("Unix Env", function (t) {
t.plan(3)