DEP0065:repl.REPL_MODE_MAGIC 和 NODE_REPL_MODE=magic


¥DEP0065: repl.REPL_MODE_MAGIC and NODE_REPL_MODE=magic

类型:生命结束

¥Type: End-of-Life

用于 replMode 选项的 node:repl 模块的 REPL_MODE_MAGIC 常量已被删除。从 Node.js 6.0.0 开始,当导入 V8 5.0 时,它的行为在功能上与 REPL_MODE_SLOPPY 相同。请改用 REPL_MODE_SLOPPY

¥The node:repl module's REPL_MODE_MAGIC constant, used for replMode option, has been removed. Its behavior has been functionally identical to that of REPL_MODE_SLOPPY since Node.js 6.0.0, when V8 5.0 was imported. Please use REPL_MODE_SLOPPY instead.

NODE_REPL_MODE 环境变量用于设置交互式 node 会话的底层 replMode。它的值 magic 也被删除。请改用 sloppy

¥The NODE_REPL_MODE environment variable is used to set the underlying replMode of an interactive node session. Its value, magic, is also removed. Please use sloppy instead.