Skip to content

Commit 88fd747

Browse files
committed
Upgrade emnapi
1 parent 6a3478b commit 88fd747

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

lib/sqlite3-binding.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.js
55
});
66
let binding = require(binding_path);
77
if (typeof binding === 'function') {
8-
const emnapiContext = require('@tybys/emnapi-runtime').createContext();
98
const emnapiInitOptions = {
10-
context: emnapiContext
9+
context: require('@emnapi/runtime').getDefaultContext()
1110
};
1211
try {
1312
// optional dependency
1413
// support async_hooks on Node.js
15-
emnapiInitOptions.nodeBinding = require('@tybys/emnapi-node-binding');
14+
emnapiInitOptions.nodeBinding = require('@emnapi/node-binding');
1615
} catch (_) {
1716
// ignore
1817
}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
},
5050
"dependencies": {
5151
"@mapbox/node-pre-gyp": "^1.0.0",
52-
"@tybys/emnapi-runtime": "^0.28.1",
52+
"@emnapi/runtime": "^0.31.0",
5353
"node-addon-api": "^4.2.0",
5454
"tar": "^6.1.11"
5555
},
5656
"devDependencies": {
57-
"@tybys/emnapi": "^0.28.1",
57+
"emnapi": "^0.31.0",
5858
"eslint": "6.8.0",
5959
"mocha": "7.2.0",
6060
"node-pre-gyp-github": "1.4.4"
@@ -68,7 +68,7 @@
6868
}
6969
},
7070
"optionalDependencies": {
71-
"@tybys/emnapi-node-binding": "^0.28.1",
71+
"@emnapi/node-binding": "^0.31.0",
7272
"node-gyp": "8.x"
7373
},
7474
"scripts": {

wasm/common.gypi

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
'-std=gnu++17'
2727
],
2828
'ldflags': [
29-
'--js-library=<!(node -p "require(\'@tybys/emnapi\').js_library")',
29+
'--js-library=<!(node -p "require(\'emnapi\').js_library")',
3030
"-sALLOW_MEMORY_GROWTH=1",
3131
"-sEXPORTED_FUNCTIONS=['_malloc','_free']",
3232
'-sNODEJS_CATCH_EXIT=0',
@@ -38,10 +38,10 @@
3838
'__STDC_FORMAT_MACROS',
3939
],
4040
'include_dirs': [
41-
'<!(node -p "require(\'@tybys/emnapi\').include")',
41+
'<!(node -p "require(\'emnapi\').include")',
4242
],
4343
'sources': [
44-
'<!@(node -p "require(\'@tybys/emnapi\').sources.map(x => JSON.stringify(path.relative(process.cwd(), x))).join(\' \')")'
44+
'<!@(node -p "require(\'emnapi\').sources.map(x => JSON.stringify(path.relative(process.cwd(), x))).join(\' \')")'
4545
],
4646

4747
'default_configuration': 'Release',

0 commit comments

Comments
 (0)