hunspell-asm
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
@@ -0,1 +1,11 @@ | ||
<a name="2.0.0-beta.4"></a> | ||
# [2.0.0-beta.4](https://github.com/kwonoj/hunspell-asm/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2019-01-26) | ||
### Bug Fixes | ||
* **createmoduleloader:** apply overridden env ([22645b6](https://github.com/kwonoj/hunspell-asm/commit/22645b6)) | ||
<a name="2.0.0-beta.3"></a> | ||
@@ -2,0 +12,0 @@ # [2.0.0-beta.3](https://github.com/kwonoj/hunspell-asm/compare/v2.0.0-beta.2...v2.0.0-beta.3) (2019-01-26) |
@@ -11,3 +11,3 @@ "use strict"; | ||
return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var env, lookupBinary, overriddenModule, moduleLoader; | ||
var env, lookupBinary, baseModule, overriddenModule, moduleLoader; | ||
return tslib_1.__generator(this, function (_c) { | ||
@@ -19,7 +19,6 @@ switch (_c.label) { | ||
lookupBinary = locateBinary || (function (_filePath) { return require('./lib/hunspell.wasm'); }); | ||
overriddenModule = emscripten_wasm_loader_1.isNode() && !locateBinary | ||
? undefined | ||
: { | ||
locateFile: function (filePath) { return (filePath.endsWith('.wasm') ? lookupBinary(filePath) : filePath); } | ||
}; | ||
baseModule = { ENVIRONMENT: env }; | ||
overriddenModule = env === emscripten_wasm_loader_1.ENVIRONMENT.NODE && !locateBinary | ||
? baseModule | ||
: tslib_1.__assign({}, baseModule, { locateFile: function (filePath) { return (filePath.endsWith('.wasm') ? lookupBinary(filePath) : filePath); } }); | ||
return [4 /*yield*/, emscripten_wasm_loader_1.getModuleLoader(function (runtime) { return hunspellLoader_1.hunspellLoader(runtime, env); }, runtime, overriddenModule, { timeout: timeout })]; | ||
@@ -26,0 +25,0 @@ case 1: |
@@ -9,3 +9,3 @@ var _this = this; | ||
return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var env, lookupBinary, overriddenModule, moduleLoader; | ||
var env, lookupBinary, baseModule, overriddenModule, moduleLoader; | ||
return tslib_1.__generator(this, function (_c) { | ||
@@ -17,7 +17,6 @@ switch (_c.label) { | ||
lookupBinary = locateBinary || (function (_filePath) { return require('./lib/hunspell.wasm'); }); | ||
overriddenModule = isNode() && !locateBinary | ||
? undefined | ||
: { | ||
locateFile: function (filePath) { return (filePath.endsWith('.wasm') ? lookupBinary(filePath) : filePath); } | ||
}; | ||
baseModule = { ENVIRONMENT: env }; | ||
overriddenModule = env === ENVIRONMENT.NODE && !locateBinary | ||
? baseModule | ||
: tslib_1.__assign({}, baseModule, { locateFile: function (filePath) { return (filePath.endsWith('.wasm') ? lookupBinary(filePath) : filePath); } }); | ||
return [4 /*yield*/, getModuleLoader(function (runtime) { return hunspellLoader(runtime, env); }, runtime, overriddenModule, { timeout: timeout })]; | ||
@@ -24,0 +23,0 @@ case 1: |
{ | ||
"name": "hunspell-asm", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"description": "WebAssembly based Javascript bindings for hunspell spellchecker", | ||
@@ -12,3 +12,3 @@ "main": "./dist/cjs/index.js", | ||
}, | ||
"hunspell-version": "dab1b23-190125" | ||
"hunspell-version": "19b43c8-190125" | ||
}, | ||
@@ -15,0 +15,0 @@ "lint-staged": { |
@@ -26,2 +26,6 @@ import { ENVIRONMENT, getModuleLoader, isNode, runtimeModuleType } from 'emscripten-wasm-loader'; | ||
//https://github.com/kwonoj/docker-hunspell-wasm/issues/63 | ||
//apply overridden environment values to custom patched hunspell preamble. | ||
const baseModule = { ENVIRONMENT: env }; | ||
//Build module object to construct wasm binary module via emscripten preamble. | ||
@@ -32,5 +36,6 @@ //This allows to override default wasm binary resolution in preamble. | ||
const overriddenModule = | ||
isNode() && !locateBinary | ||
? undefined | ||
env === ENVIRONMENT.NODE && !locateBinary | ||
? baseModule | ||
: { | ||
...baseModule, | ||
locateFile: (filePath: string) => (filePath.endsWith('.wasm') ? lookupBinary(filePath) : filePath) | ||
@@ -37,0 +42,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6060786
18282
15