From 7630fc2edf13a01580ec0c22fdb7ddb872251254 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 11 Apr 2014 21:50:10 +0200 Subject: [PATCH 01/20] added node-pre-gyp --- binding.gyp | 12 +++++++++++- package.json | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/binding.gyp b/binding.gyp index 79e61306..2691d38b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -37,5 +37,15 @@ , "src/leveldown.cc" , "src/leveldown_async.cc" ] - }] + }, { + "target_name": "action_after_build", + "type": "none", + "dependencies": [ "<(module_name)" ], + "copies": [ + { + "files": [ "<(PRODUCT_DIR)/<(module_name).node" ], + "destination": "<(module_path)" + } + ] + }] } diff --git a/package.json b/package.json index cd67f12b..33549859 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ ], "main": "index.js", "dependencies": { + "node-pre-gyp": "0.5.x", "bindings": "~1.1.1", "nan": "~0.6.0", "abstract-leveldown": "^0.11.4" @@ -43,8 +44,18 @@ "node-gyp": "~0.12.1" }, "scripts": { - "test": "tap test/*-test.js --stderr" }, "license": "MIT", - "gypfile": true + "gypfile": true, + "bundledDependencies":["node-pre-gyp"], + "scripts": { + "install": "node-pre-gyp install --fallback-to-build", + "test": "tap test/*-test.js --stderr", + "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" + }, + "binary": { + "module_name": "leveldown", + "module_path": "./build-pre-gyp/", + "host": "https://leveldown-mafintosh.s3-eu-west-1.amazonaws.com" + } } From 11a39e2af6e95e80a00ffa8df4d7d505363ce373 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 11 Apr 2014 21:50:19 +0200 Subject: [PATCH 02/20] should work with node-pre-gyp --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 9193802d..5cab8169 100644 --- a/index.js +++ b/index.js @@ -1 +1,5 @@ -module.exports = require('bindings')('leveldown.node').leveldown \ No newline at end of file +var binary = require('node-pre-gyp'); +var path = require('path'); +var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json'))); + +module.exports = require(binding_path).leveldown; \ No newline at end of file From d50b39b6babad4c0804df78d57d4bcb8b759dd98 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 11 Apr 2014 21:50:38 +0200 Subject: [PATCH 03/20] fixed indent --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33549859..1199eb67 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "scripts": { "install": "node-pre-gyp install --fallback-to-build", "test": "tap test/*-test.js --stderr", - "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" + "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" }, "binary": { "module_name": "leveldown", From 29df2ea53501e3a37eb08b8dbe5e5ad13a6241e6 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 11 Apr 2014 21:55:44 +0200 Subject: [PATCH 04/20] aws-sdk is a dev dep --- package.json | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 1199eb67..46467584 100644 --- a/package.json +++ b/package.json @@ -41,18 +41,19 @@ "abstract-leveldown": "~0.11.1", "monotonic-timestamp": "~0.0.8", "du": "~0.0.1", - "node-gyp": "~0.12.1" + "node-gyp": "~0.12.1", + "aws-sdk": "^2.0.0-rc13" }, - "scripts": { - }, - "license": "MIT", - "gypfile": true, - "bundledDependencies":["node-pre-gyp"], "scripts": { "install": "node-pre-gyp install --fallback-to-build", "test": "tap test/*-test.js --stderr", - "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" + "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" }, + "license": "MIT", + "gypfile": true, + "bundledDependencies": [ + "node-pre-gyp" + ], "binary": { "module_name": "leveldown", "module_path": "./build-pre-gyp/", From ba9b322f0e2e1b774d1caf9d1607bb07c3ed4b7c Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 11 Apr 2014 21:56:23 +0200 Subject: [PATCH 05/20] ignoring build-pre-gyp --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 43b07bd2..952b9539 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules/ build/ +build-pre-gyp/ libleveldb.so libleveldb.a leakydb From dde309eee2855a9ffd6a711f0fdd1730dbeaa152 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 26 Apr 2014 00:41:35 +0200 Subject: [PATCH 06/20] changed prebuild url to point to github --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46467584..c6dcd3bc 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,6 @@ "binary": { "module_name": "leveldown", "module_path": "./build-pre-gyp/", - "host": "https://leveldown-mafintosh.s3-eu-west-1.amazonaws.com" + "host": "https://github.com/mafintosh/node-leveldown/releases/download/v0.10.2" } } From 8201ff519aef2111e52e711a5ebd6352565a11c1 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 26 Apr 2014 00:44:47 +0200 Subject: [PATCH 07/20] added notice in README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index d9dd581c..0959a81b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +# NOTICE + +This is an experimental fork of leveldown using prebuild binaries to avoid the compile step when install from npm. +To use this fork by do + +``` +npm install leveldown-prebuilt +``` + LevelDOWN ========= From e41b8c778a1e25ad8608c6693f2b76a3d0980050 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 26 Apr 2014 00:46:27 +0200 Subject: [PATCH 08/20] changed name to leveldown-prebuilt --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6dcd3bc..a9019909 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "leveldown", + "name": "leveldown-prebuilt", "description": "A Node.js LevelDB binding, primary backend for LevelUP", "version": "0.10.2", "contributors": [ From 7031db343b6c5f6fb67e9392540ea2af7fca0c26 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 26 Apr 2014 01:19:41 +0200 Subject: [PATCH 09/20] added prebuild script --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a9019909..b553b062 100644 --- a/package.json +++ b/package.json @@ -41,13 +41,12 @@ "abstract-leveldown": "~0.11.1", "monotonic-timestamp": "~0.0.8", "du": "~0.0.1", - "node-gyp": "~0.12.1", - "aws-sdk": "^2.0.0-rc13" + "node-gyp": "~0.12.1" }, "scripts": { "install": "node-pre-gyp install --fallback-to-build", "test": "tap test/*-test.js --stderr", - "publish-to-s3": "node-pre-gyp rebuild && node-pre-gyp package publish" + "prebuild": "node-pre-gyp rebuild && node-pre-gyp package" }, "license": "MIT", "gypfile": true, From 072b448958e7d8f0661f835d944d5f0e34790a25 Mon Sep 17 00:00:00 2001 From: Max Ogden Date: Fri, 25 Apr 2014 18:43:19 -0700 Subject: [PATCH 10/20] add link to releases from readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0959a81b..4bc10a72 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ To use this fork by do npm install leveldown-prebuilt ``` +For a list of supported prebuilt platform binaries check out https://github.com/mafintosh/node-leveldown/releases + LevelDOWN ========= From b1b72b5254c41831a4ffb3c0d7d73c94d9a97070 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 26 Apr 2014 09:46:21 +0200 Subject: [PATCH 11/20] less garble in the readmme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4bc10a72..bc9b640c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # NOTICE -This is an experimental fork of leveldown using prebuild binaries to avoid the compile step when install from npm. -To use this fork by do +This is an experimental fork of leveldown using prebuild binaries to avoid the compile step when installing from npm. +To use this fork do ``` npm install leveldown-prebuilt From 0f1da62048a958ced46471b1c93c2e484327d12b Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sun, 27 Apr 2014 00:18:40 +0200 Subject: [PATCH 12/20] hyper notice --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index bc9b640c..79ab1402 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,12 @@ To use this fork do npm install leveldown-prebuilt ``` +Or to install the hyper fork + +``` +npm install leveldown-hyper-prebuilt +``` + For a list of supported prebuilt platform binaries check out https://github.com/mafintosh/node-leveldown/releases LevelDOWN From efdbf2c5704d6328b2eacf0bace7491de7b5f3b9 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 9 Oct 2014 13:22:17 +0800 Subject: [PATCH 13/20] fix url and homepage links --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b553b062..87590b46 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ ], "repository": { "type": "git", - "url": "https://github.com/rvagg/node-leveldown.git" + "url": "https://github.com/mafintosh/leveldown-prebuilt.git" }, - "homepage": "https://github.com/rvagg/node-leveldown", + "homepage": "https://github.com/mafintosh/leveldown-prebuilt", "keywords": [ "leveldb", "level" From 82d0888a421796bfa7624d728bd8bdcdab3e614d Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 9 Oct 2014 13:22:21 +0800 Subject: [PATCH 14/20] 0.10.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87590b46..c444ce36 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "leveldown-prebuilt", "description": "A Node.js LevelDB binding, primary backend for LevelUP", - "version": "0.10.2", + "version": "0.10.3", "contributors": [ "Rod Vagg (https://github.com/rvagg)", "John Chesley (https://github.com/chesles/)", From 541a065da2aa8c6efe8ce33a3bc13874e390bcc4 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Mon, 9 Feb 2015 13:27:40 -0800 Subject: [PATCH 15/20] bump node-pre-gyp --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 53535eea..219f5f4f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "bindings": "~1.2.1", "fast-future": "~1.0.0", "nan": "~1.5.0", - "node-pre-gyp": "0.5.x" + "node-pre-gyp": "~0.6.2" }, "devDependencies": { "du": "~0.1.0", From aa982df7804fad01fe509e9f6e2aacc9f085b830 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Sat, 30 May 2015 18:03:11 +0200 Subject: [PATCH 16/20] change NOTICE to Prebuilt binaries section --- README.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b06d9526..b054fe50 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,3 @@ -# NOTICE - -This is an experimental fork of leveldown using prebuild binaries to avoid the compile step when installing from npm. -To use this fork do - -``` -npm install leveldown-prebuilt -``` - -Or to install the hyper fork - -``` -npm install leveldown-hyper-prebuilt -``` - -For a list of supported prebuilt platform binaries check out https://github.com/mafintosh/node-leveldown/releases - LevelDOWN ========= @@ -313,6 +296,11 @@ See the [contribution guide](https://github.com/Level/community/blob/master/CONT A large portion of the Windows support comes from code by [Krzysztof Kowalczyk](http://blog.kowalczyk.info/) [@kjk](https://twitter.com/kjk), see his Windows LevelDB port [here](http://code.google.com/r/kkowalczyk-leveldb/). If you're using LevelUP on Windows, you should give him your thanks! +Prebuilt binaries +----------------- + +LevelDOWN uses `node-pre-gyp` to support prebuilt binaries. For a list of supported prebuilt platform binaries see https://github.com/Level/leveldown/releases + License & copyright ------------------- From 245b54a4e69d03b2bf1bf22d3558cfc6e1caa807 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Tue, 2 Jun 2015 00:18:39 +0200 Subject: [PATCH 17/20] prepare v1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46da43db..17095767 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,6 @@ "binary": { "module_name": "leveldown", "module_path": "./build-pre-gyp/", - "host": "https://github.com/level/leveldown/releases/download/v1.1.0" + "host": "https://github.com/level/leveldown/releases/download/v1.2.1" } } From ec81d77746f7811da764e2b12f1c1c10af94fd32 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Tue, 2 Jun 2015 01:04:33 +0200 Subject: [PATCH 18/20] use node-gyp-install to make sure correct node-gyp headers are downloaded --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9661b5cd..b72271d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: node_js before_install: - export JOBS=max + - npm install -g node-gyp-install + - node-gyp-install node_js: - "2.0.0" From 78068f26ca35f2853dc76cc432d93b58899b4663 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Tue, 2 Jun 2015 01:05:02 +0200 Subject: [PATCH 19/20] add more iojs versions --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b72271d6..682ca89e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,10 @@ before_install: - node-gyp-install node_js: - - "2.0.0" - - "1.8.1" + - "2.2" + - "2.1" + - "2.0" + - "1.8" - "0.12" - "0.10" From 25d5f6206a6c97391c67cefd5fc65f3c18df1f04 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Tue, 2 Jun 2015 01:32:17 +0200 Subject: [PATCH 20/20] use remote_path with node-pre-gyp to dodge preparing package.json every time --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 17095767..02ef5b66 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "binary": { "module_name": "leveldown", "module_path": "./build-pre-gyp/", - "host": "https://github.com/level/leveldown/releases/download/v1.2.1" + "host": "https://github.com/level/leveldown/releases/download", + "remote_path": "./v{version}" } }