Skip to content

Commit 8db96d4

Browse files
authored
Replaced Python extraction script with JS (#1570)
1 parent 11c988c commit 8db96d4

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

deps/extract.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const tar = require("tar");
2+
const path = require("path");
3+
const tarball = path.resolve(process.argv[2]);
4+
const dirname = path.resolve(process.argv[3]);
5+
6+
tar.extract({
7+
sync: true,
8+
file: tarball,
9+
cwd: dirname,
10+
});

deps/extract.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

deps/sqlite3.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
'outputs': [
6161
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
6262
],
63-
'action': ['<!(node -p "process.env.PYTHON")','./extract.py','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
63+
'action': ['node','./extract.js','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
6464
}
6565
],
6666
'direct_dependent_settings': {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
},
4343
"dependencies": {
4444
"@mapbox/node-pre-gyp": "^1.0.0",
45-
"node-addon-api": "^4.2.0"
45+
"node-addon-api": "^4.2.0",
46+
"tar": "^6.1.11"
4647
},
4748
"devDependencies": {
4849
"eslint": "^7.32.0",

0 commit comments

Comments
 (0)