[Pkg-javascript-commits] [node-leveldown] 328/492: remove browserify shim, update changelog

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:13 UTC 2014


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

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit 6d5b809c45237b0480d3f3c5a7c517289f0fe0cd
Author: Rod Vagg <rod at vagg.org>
Date:   Tue May 14 20:52:13 2013 +1000

    remove browserify shim, update changelog
---
 CHANGELOG.md  |   7 ++--
 index-shim.js | 116 ----------------------------------------------------------
 package.json  |   5 +--
 3 files changed, 4 insertions(+), 124 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3cb4a0a..69c86f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,7 @@
-0.2.2 @ (unreleased)
+0.3.0 (& 0.2.2) @ May 14 2013
 ===================
-  * Pull API tests up into AbstractLevelDOWN, require it to run the
-tests. AbstractLevelDOWN can now be used to test LevelDOWN-compliant
-APIs. (@maxogden)
+  * Pull API tests up into AbstractLevelDOWN, require it to run the tests. AbstractLevelDOWN can now be used to test LevelDOWN-compliant APIs. (@maxogden)
+  * Change Iterator methods to return errors on the callbacks rather than throw (@mcollina & @rvagg)
 
 0.2.1 @ Apr 8 2013
 ==================
diff --git a/index-shim.js b/index-shim.js
deleted file mode 100644
index 34c6d01..0000000
--- a/index-shim.js
+++ /dev/null
@@ -1,116 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs')
-  , path = require('path')
-  , join = path.join
-  , dirname = path.dirname
-  , exists = fs.existsSync || path.existsSync
-  , defaults = {
-        arrow: process.env.NODE_BINDINGS_ARROW || ' → '
-      , compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'
-      , platform: process.platform
-      , arch: process.arch
-      , version: "1.0"
-      , bindings: 'bindings.node'
-      , try: [
-          // node-gyp's linked version in the "build" dir
-          [ 'module_root', 'build', 'bindings' ]
-          // node-waf and gyp_addon (a.k.a node-gyp)
-        , [ 'module_root', 'build', 'Debug', 'bindings' ]
-        , [ 'module_root', 'build', 'Release', 'bindings' ]
-          // Debug files, for development (legacy behavior, remove for node v0.9)
-        , [ 'module_root', 'out', 'Debug', 'bindings' ]
-        , [ 'module_root', 'Debug', 'bindings' ]
-          // Release files, but manually compiled (legacy behavior, remove for node v0.9)
-        , [ 'module_root', 'out', 'Release', 'bindings' ]
-        , [ 'module_root', 'Release', 'bindings' ]
-          // Legacy from node-waf, node <= 0.4.x
-        , [ 'module_root', 'build', 'default', 'bindings' ]
-          // Production "Release" buildtype binary (meh...)
-        , [ 'module_root', 'compiled', 'version', 'platform', 'arch', 'bindings' ]
-        ]
-    }
-
-/**
- * The main `bindings()` function loads the compiled bindings for a given module.
- * It uses V8's Error API to determine the parent filename that this function is
- * being invoked from, which is then used to find the root directory.
- */
-
-function bindings (opts) {
-
-  var mock = {}
-  function leveldown (){
-    this.open = function(){}
-  }
-  mock.leveldown = new leveldown
-  return mock  
-}
-
-
-module.exports = exports = bindings
-
-
-/**
- * Gets the filename of the JavaScript file that invokes this function.
- * Used to help find the root directory of a module.
- */
-
-exports.getFileName = function getFileName () {
-  var origPST = Error.prepareStackTrace
-    , dummy = {}
-    , fileName
-
-  Error.prepareStackTrace = function (e, st) {
-    for (var i=0, l=st.length; i<l; i++) {
-      fileName = st[i].getFileName()
-      if (fileName !== __filename) {
-        return
-      }
-    }
-  }
-
-  // run the 'prepareStackTrace' function above
-  Error.captureStackTrace(dummy)
-  dummy.stack
-
-  // cleanup
-  Error.prepareStackTrace = origPST
-
-  return fileName
-}
-
-/**
- * Gets the root directory of a module, given an arbitrary filename
- * somewhere in the module tree. The "root directory" is the directory
- * containing the `package.json` file.
- *
- *   In:  /home/nate/node-native-module/lib/index.js
- *   Out: /home/nate/node-native-module
- */
-
-exports.getRoot = function getRoot (file) {
-  var dir = dirname(file)
-    , prev
-  while (true) {
-    if (dir === '.') {
-      // Avoids an infinite loop in rare cases, like the REPL
-      dir = process.cwd()
-    }
-    if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
-      // Found the 'package.json' file or 'node_modules' dir; we're done
-      return dir
-    }
-    if (prev === dir) {
-      // Got to the top
-      throw new Error('Could not find module root given file: "' + file
-                    + '". Do you have a `package.json` file? ')
-    }
-    // Try the parent dir next
-    prev = dir
-    dir = join(dir, '..')
-  }
-}
diff --git a/package.json b/package.json
index 3c2446d..b7ce735 100644
--- a/package.json
+++ b/package.json
@@ -36,9 +36,6 @@
   , "scripts"         : {
         "test"            : "tap test/*-test.js --stderr"
     }
-  , "browser": {
-    "bindings": "./index-shim.js"
-  },
-   "license"         : "MIT"
+  , "license"         : "MIT"
   , "gypfile"         : true
 }

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



More information about the Pkg-javascript-commits mailing list