[Pkg-javascript-commits] [node-global-modules] 01/05: New upstream version 1.0.0

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Wed Jan 24 12:06:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository node-global-modules.

commit 4569bc74a859483fd0f40dcf468bbea86b5cd830
Author: Pirate Praveen <praveen at debian.org>
Date:   Fri Jan 5 23:57:18 2018 +0530

    New upstream version 1.0.0
---
 .editorconfig  |  13 +---
 .eslintrc.json | 228 +++++++++------------------------------------------------
 .gitignore     |  28 +++++--
 .travis.yml    |  19 +++--
 .verb.md       |   6 +-
 LICENSE        |   4 +-
 README.md      |  40 ++++++----
 index.js       |  23 ++++--
 package.json   |  24 +++---
 test.js        |  10 +--
 10 files changed, 140 insertions(+), 255 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 991900b..818e072 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,3 @@
-# http://editorconfig.org
 root = true
 
 [*]
@@ -9,14 +8,6 @@ indent_size = 2
 trim_trailing_whitespace = true
 insert_final_newline = true
 
-[*.md]
+[{**/{actual,fixtures,expected,templates}/**,*.md}]
 trim_trailing_whitespace = false
-insert_final_newline = false
-
-[test/**]
-trim_trailing_whitespace = false
-insert_final_newline = false
-
-[templates/**]
-trim_trailing_whitespace = false
-insert_final_newline = false
+insert_final_newline = false
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
index 5b78706..61e8895 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,107 +1,36 @@
 {
-  "ecmaFeatures": {
-    "modules": true,
-    "experimentalObjectRestSpread": true
-  },
   "env": {
     "browser": false,
     "es6": true,
     "node": true,
     "mocha": true
   },
+
   "globals": {
     "document": false,
     "navigator": false,
     "window": false
   },
+
   "rules": {
     "accessor-pairs": 2,
-    "arrow-spacing": [
-      2,
-      {
-        "before": true,
-        "after": true
-      }
-    ],
-    "block-spacing": [
-      2,
-      "always"
-    ],
-    "brace-style": [
-      2,
-      "1tbs",
-      {
-        "allowSingleLine": true
-      }
-    ],
-    "comma-dangle": [
-      2,
-      "never"
-    ],
-    "comma-spacing": [
-      2,
-      {
-        "before": false,
-        "after": true
-      }
-    ],
-    "comma-style": [
-      2,
-      "last"
-    ],
+    "arrow-spacing": [2, { "before": true, "after": true }],
+    "block-spacing": [2, "always"],
+    "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+    "comma-dangle": [2, "never"],
+    "comma-spacing": [2, { "before": false, "after": true }],
+    "comma-style": [2, "last"],
     "constructor-super": 2,
-    "curly": [
-      2,
-      "multi-line"
-    ],
-    "dot-location": [
-      2,
-      "property"
-    ],
+    "curly": [2, "multi-line"],
+    "dot-location": [2, "property"],
     "eol-last": 2,
-    "eqeqeq": [
-      2,
-      "allow-null"
-    ],
-    "generator-star-spacing": [
-      2,
-      {
-        "before": true,
-        "after": true
-      }
-    ],
-    "handle-callback-err": [
-      2,
-      "^(err|error)$"
-    ],
-    "indent": [
-      2,
-      2,
-      {
-        "SwitchCase": 1
-      }
-    ],
-    "key-spacing": [
-      2,
-      {
-        "beforeColon": false,
-        "afterColon": true
-      }
-    ],
-    "keyword-spacing": [
-      2,
-      {
-        "before": true,
-        "after": true
-      }
-    ],
-    "new-cap": [
-      2,
-      {
-        "newIsCap": true,
-        "capIsNew": false
-      }
-    ],
+    "eqeqeq": [2, "allow-null"],
+    "generator-star-spacing": [2, { "before": true, "after": true }],
+    "handle-callback-err": [2, "^(err|error)$" ],
+    "indent": [2, 2, { "SwitchCase": 1 }],
+    "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
+    "keyword-spacing": [2, { "before": true, "after": true }],
+    "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
     "new-parens": 2,
     "no-array-constructor": 2,
     "no-caller": 2,
@@ -121,18 +50,12 @@
     "no-extend-native": 2,
     "no-extra-bind": 2,
     "no-extra-boolean-cast": 2,
-    "no-extra-parens": [
-      2,
-      "functions"
-    ],
+    "no-extra-parens": [2, "functions"],
     "no-fallthrough": 2,
     "no-floating-decimal": 2,
     "no-func-assign": 2,
     "no-implied-eval": 2,
-    "no-inner-declarations": [
-      2,
-      "functions"
-    ],
+    "no-inner-declarations": [2, "functions"],
     "no-invalid-regexp": 2,
     "no-irregular-whitespace": 2,
     "no-iterator": 2,
@@ -142,12 +65,7 @@
     "no-mixed-spaces-and-tabs": 2,
     "no-multi-spaces": 2,
     "no-multi-str": 2,
-    "no-multiple-empty-lines": [
-      2,
-      {
-        "max": 1
-      }
-    ],
+    "no-multiple-empty-lines": [2, { "max": 1 }],
     "no-native-reassign": 0,
     "no-negated-in-lhs": 2,
     "no-new": 2,
@@ -173,103 +91,27 @@
     "no-undef": 2,
     "no-undef-init": 2,
     "no-unexpected-multiline": 2,
-    "no-unneeded-ternary": [
-      2,
-      {
-        "defaultAssignment": false
-      }
-    ],
+    "no-unneeded-ternary": [2, { "defaultAssignment": false }],
     "no-unreachable": 2,
-    "no-unused-vars": [
-      2,
-      {
-        "vars": "all",
-        "args": "none"
-      }
-    ],
+    "no-unused-vars": [2, { "vars": "all", "args": "none" }],
     "no-useless-call": 0,
     "no-with": 2,
-    "one-var": [
-      0,
-      {
-        "initialized": "never"
-      }
-    ],
-    "operator-linebreak": [
-      0,
-      "after",
-      {
-        "overrides": {
-          "?": "before",
-          ":": "before"
-        }
-      }
-    ],
-    "padded-blocks": [
-      0,
-      "never"
-    ],
-    "quotes": [
-      2,
-      "single",
-      "avoid-escape"
-    ],
+    "one-var": [0, { "initialized": "never" }],
+    "operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }],
+    "padded-blocks": [0, "never"],
+    "quotes": [2, "single", "avoid-escape"],
     "radix": 2,
-    "semi": [
-      2,
-      "always"
-    ],
-    "semi-spacing": [
-      2,
-      {
-        "before": false,
-        "after": true
-      }
-    ],
-    "space-before-blocks": [
-      2,
-      "always"
-    ],
-    "space-before-function-paren": [
-      2,
-      "never"
-    ],
-    "space-in-parens": [
-      2,
-      "never"
-    ],
+    "semi": [2, "always"],
+    "semi-spacing": [2, { "before": false, "after": true }],
+    "space-before-blocks": [2, "always"],
+    "space-before-function-paren": [2, "never"],
+    "space-in-parens": [2, "never"],
     "space-infix-ops": 2,
-    "space-unary-ops": [
-      2,
-      {
-        "words": true,
-        "nonwords": false
-      }
-    ],
-    "spaced-comment": [
-      0,
-      "always",
-      {
-        "markers": [
-          "global",
-          "globals",
-          "eslint",
-          "eslint-disable",
-          "*package",
-          "!",
-          ","
-        ]
-      }
-    ],
+    "space-unary-ops": [2, { "words": true, "nonwords": false }],
+    "spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
     "use-isnan": 2,
     "valid-typeof": 2,
-    "wrap-iife": [
-      2,
-      "any"
-    ],
-    "yoda": [
-      2,
-      "never"
-    ]
+    "wrap-iife": [2, "any"],
+    "yoda": [2, "never"]
   }
 }
diff --git a/.gitignore b/.gitignore
index 5c8a697..f2a4ab2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,28 @@
-*.DS_store
+# always ignore files
+*.DS_Store
 *.sublime-*
-_gh_pages
-bower_components
+
+# test related, or directories generated by tests
+test/actual
+actual
+coverage
+.nyc*
+
+# npm
 node_modules
 npm-debug.log
-actual
-test/actual
+
+# yarn
+yarn.lock
+yarn-error.log
+
+# misc
+_gh_pages
+_draft
+_drafts
+bower_components
+vendor
 temp
 tmp
 TODO.md
-vendor
\ No newline at end of file
+package-lock.json
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 09768f0..f3d25a3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,17 @@
 sudo: false
+os:
+  - linux
+  - osx
 language: node_js
 node_js:
-  - "stable"
-  - "5"
-  - "4"
-  - "0.12"
-  - "0.10"
+  - node
+  - '8'
+  - '7'
+  - '6'
+  - '5'
+  - '4'
+  - '0.12'
+  - '0.10'
 matrix:
   fast_finish: true
-  allow_failures:
-    - node_js: "0.10"
+  allow_failures: []
diff --git a/.verb.md b/.verb.md
index 67ad867..250d0dc 100644
--- a/.verb.md
+++ b/.verb.md
@@ -1,6 +1,8 @@
 ## Usage
 
 ```js
-var dir = require('{%= name %}');
-//=> '/usr/local/lib/node_modules' (depends on OS)
+var globalModules = require('{%= name %}');
+console.log(globalModules);
+//=> '/usr/local/lib/node_modules' 
 ```
+_(Note that this path might be different based on OS or user defined configuration settings)_
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 1e49edf..c0d7f13 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2015-2016, Jon Schlinkert.
+Copyright (c) 2015-2017, Jon Schlinkert.
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 4c8280e..a076f65 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# global-modules [![NPM version](https://img.shields.io/npm/v/global-modules.svg?style=flat)](https://www.npmjs.com/package/global-modules) [![NPM downloads](https://img.shields.io/npm/dm/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![Build Status](https://img.shields.io/travis/jonschlinkert/global-modules.svg?style=flat)](https://travis-ci.org/jonschlinkert/global-modules)
+# global-modules [![NPM version](https://img.shields.io/npm/v/global-modules.svg?style=flat)](https://www.npmjs.com/package/global-modules) [![NPM monthly downloads](https://img.shields.io/npm/dm/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![NPM total downloads](https://img.shields.io/npm/dt/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/global-modules.svg?style=fl [...]
 
-The directory used by npm for globally installed npm modules.
+> The directory used by npm for globally installed npm modules.
 
 ## Install
 
@@ -13,39 +13,49 @@ $ npm install --save global-modules
 ## Usage
 
 ```js
-var dir = require('global-modules');
-//=> '/usr/local/lib/node_modules' (depends on OS)
+var globalModules = require('global-modules');
+console.log(globalModules);
+//=> '/usr/local/lib/node_modules' 
 ```
+_(Note that this path might be different based on OS or user defined configuration settings)_
 
 ## About
 
 ### Related projects
 
-* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
-* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's global .gitconfig.")
+* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's local or global .gitconfig.")
 * [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.")
+* [homedir-polyfill](https://www.npmjs.com/package/homedir-polyfill): Node.js os.homedir polyfill for older versions of node.js. | [homepage](https://github.com/doowb/homedir-polyfill "Node.js os.homedir polyfill for older versions of node.js.")
 * [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique "npm" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths "Returns an array of unique "npm" directories based on the user's platform and environment.")
 
 ### Contributing
 
 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
 
+### Contributors
+
+| **Commits** | **Contributor** | 
+| --- | --- |
+| 14 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [jason-chang](https://github.com/jason-chang) |
+| 1 | [Kikobeats](https://github.com/Kikobeats) |
+
 ### Building docs
 
-_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
 
-To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+To generate the readme, run the following command:
 
 ```sh
-$ npm install -g verb verb-generate-readme && verb
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
 ```
 
 ### Running tests
 
-Install dev dependencies:
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
 
 ```sh
-$ npm install -d && npm test
+$ npm install && npm test
 ```
 
 ### Author
@@ -53,13 +63,13 @@ $ npm install -d && npm test
 **Jon Schlinkert**
 
 * [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
 
 ### License
 
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/global-modules/blob/master/LICENSE).
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
 
 ***
 
-_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 26, 2016._
\ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 28, 2017._
\ No newline at end of file
diff --git a/index.js b/index.js
index 5fbab57..e4c2b8b 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,7 @@
 /*!
  * global-modules <https://github.com/jonschlinkert/global-modules>
  *
- * Copyright (c) 2015 Jon Schlinkert.
+ * Copyright (c) 2015-2017 Jon Schlinkert.
  * Licensed under the MIT license.
  */
 
@@ -10,9 +10,22 @@
 var path = require('path');
 var prefix = require('global-prefix');
 var isWindows = require('is-windows');
+var gm;
 
-if (isWindows()) {
-  module.exports = path.resolve(prefix, 'node_modules');
-} else {
-  module.exports = path.resolve(prefix, 'lib/node_modules');
+function getPath() {
+  if (isWindows()) {
+    return path.resolve(prefix, 'node_modules');
+  }
+  return path.resolve(prefix, 'lib/node_modules');
 }
+
+/**
+ * Expose `global-modules` path
+ */
+
+Object.defineProperty(module, 'exports', {
+  enumerable: true,
+  get: function() {
+    return gm || (gm = getPath());
+  }
+});
diff --git a/package.json b/package.json
index 420e870..35430bb 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,14 @@
 {
   "name": "global-modules",
   "description": "The directory used by npm for globally installed npm modules.",
-  "version": "0.2.3",
+  "version": "1.0.0",
   "homepage": "https://github.com/jonschlinkert/global-modules",
   "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+  "contributors": [
+    "JasonChang (https://packagist.org/packages/jason-chang)",
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+    "Kiko Beats (https://kikobeats.com)"
+  ],
   "repository": "jonschlinkert/global-modules",
   "bugs": {
     "url": "https://github.com/jonschlinkert/global-modules/issues"
@@ -20,19 +25,20 @@
     "test": "mocha"
   },
   "dependencies": {
-    "global-prefix": "^0.1.4",
-    "is-windows": "^0.2.0"
+    "global-prefix": "^1.0.1",
+    "is-windows": "^1.0.1",
+    "resolve-dir": "^1.0.0"
   },
   "devDependencies": {
-    "fs-exists-sync": "^0.1.0",
-    "gulp-format-md": "^0.1.9",
-    "mocha": "^2.5.3"
+    "gulp-format-md": "^0.1.12",
+    "mocha": "^3.4.2"
   },
   "keywords": [
     "directory",
     "dirname",
     "global",
     "module",
+    "modules",
     "package",
     "path",
     "prefix",
@@ -50,10 +56,10 @@
     ],
     "related": {
       "list": [
-        "global-prefix",
+        "homedir-polyfill",
         "git-config-path",
-        "npm-paths",
-        "contains-path"
+        "global-prefix",
+        "npm-paths"
       ]
     },
     "reflinks": [
diff --git a/test.js b/test.js
index b76130b..e2c1d3d 100644
--- a/test.js
+++ b/test.js
@@ -1,19 +1,19 @@
 /*!
  * global-modules <https://github.com/jonschlinkert/global-modules>
  *
- * Copyright (c) 2015 Jon Schlinkert.
+ * Copyright (c) 2015-2017 Jon Schlinkert.
  * Licensed under the MIT license.
  */
 
 'use strict';
 
 require('mocha');
+var fs = require('fs');
 var assert = require('assert');
-var exists = require('fs-exists-sync');
-var mods = require('./');
+var gm = require('./');
 
-describe('mods', function() {
+describe('global-modules', function() {
   it('should resolve the path to the global npm modules directory:', function() {
-    assert(exists(mods));
+    assert(fs.existsSync(gm));
   });
 });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-global-modules.git



More information about the Pkg-javascript-commits mailing list