emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
To: emacs-orgmode@gnu.org
Subject: ob-js uses deprecated Node APIs
Date: Wed, 11 Mar 2020 02:47:40 +0300	[thread overview]
Message-ID: <7652301583883715@vla1-a6eaa355d163.qloud-c.yandex.net> (raw)

I ran into problems with ob-js. When resolving them, I found that require ('sys') is deprecated, there is a patch.

diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index 7592040ab..d459e8069 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -65,7 +65,7 @@
   :safe #'stringp)
 (defvar org-babel-js-function-wrapper
-  "require('sys').print(require('sys').inspect(function(){\n%s\n}()));"
+  "require('process').stdout.write(require('util').inspect(function(){%s}()));"
   "Javascript code to print value of body.")
 (defun org-babel-execute:js (body params)

             reply	other threads:[~2020-03-10 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 23:47 Ivan Sokolov [this message]
2020-05-20 20:05 ` ob-js uses deprecated Node APIs Matthew Lundin
2020-05-22 14:09 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7652301583883715@vla1-a6eaa355d163.qloud-c.yandex.net \
    --to=ivan-p-sokolov@ya.ru \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).