You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While manually installing the extension, the following warning appears:
code --install-extension ilatex.vsix
Installing extensions...
(node:46741) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues.
Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Electron --trace-deprecation ...` to show where the warning was created)
Extension 'ilatex.vsix' was successfully installed.
With --trace-deprecation we can locate where the deprecated function is being used:
Installing extensions...
(node:47479) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues.
Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
at showFlaggedDeprecation (node:buffer:191:11)
at new Buffer (node:buffer:275:3)
at /Visual Studio Code.app/Contents/Resources/app/node_modules.asar/fd-slicer/index.js:109:18
at pendGo (/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/pend/index.js:54:3)
at onCb (/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/pend/index.js:41:7)
at /Visual Studio Code.app/Contents/Resources/app/node_modules.asar/fd-slicer/index.js:31:7
at FSReqCallback.wrapper [as oncomplete] (node:fs:677:5)
Extension 'ilatex.vsix' was successfully installed.
Sorry for the slow answer, and thank you for suggesting this fix/update! :)
After merging your fix, I tried updating PDF.js to the current last version (4.0.379), but it seems like they switched to ES modules starting from major version 4, which are—as far as I know—not readily compatible with the architecture of i-LaTeX's webview. However, the last release before that change, version 3.11.174, seems to work just fine. 671cae1 updates the code to use this version instead, which, indeed, does not seem to instantiate any Buffer object using new.
That function was deprecated as per nodejs/node#4660.
While manually installing the extension, the following warning appears:
With
--trace-deprecation
we can locate where the deprecated function is being used:The following is the line that's causing this:
ilatex/src/webview/template/static/js/pdf.js
Line 21298 in 822b590
To achieve the migration, we need to change its syntax:
In the codebase:
Additionally,
i-LaTeX
is using version2.3.200
ofpdf.js
:ilatex/src/webview/template/static/js/pdf.js
Line 127 in 822b590
Last release of
pdf.js
currently is 3.9.179 and lacks this issue, so upgrading the dependency is another option to be considered.The text was updated successfully, but these errors were encountered: