DEP0084:需要打包的内部依赖


¥DEP0084: requiring bundled internal dependencies

类型:生命结束

¥Type: End-of-Life

自 Node.js 4.4.0 和 5.2.0 版本以来,几个仅供内部使用的模块通过 require() 错误地暴露给用户代码。这些模块是:

¥Since Node.js versions 4.4.0 and 5.2.0, several modules only intended for internal usage were mistakenly exposed to user code through require(). These modules were:

  • v8/tools/codemap

  • v8/tools/consarray

  • v8/tools/csvparser

  • v8/tools/logreader

  • v8/tools/profile_view

  • v8/tools/profile

  • v8/tools/SourceMap

  • v8/tools/splaytree

  • v8/tools/tickprocessor-driver

  • v8/tools/tickprocessor

  • node-inspect/lib/_inspect(从 7.6.0 开始)

    ¥node-inspect/lib/_inspect (from 7.6.0)

  • node-inspect/lib/internal/inspect_client(从 7.6.0 开始)

    ¥node-inspect/lib/internal/inspect_client (from 7.6.0)

  • node-inspect/lib/internal/inspect_repl(从 7.6.0 开始)

    ¥node-inspect/lib/internal/inspect_repl (from 7.6.0)

v8/* 模块没有任何导出,如果不按特定顺序导入,实际上会引发错误。因此,几乎没有通过 require() 导入它们的合法用例。

¥The v8/* modules do not have any exports, and if not imported in a specific order would in fact throw errors. As such there are virtually no legitimate use cases for importing them through require().

另一方面,node-inspect 可以通过包管理器在本地安装,因为它以相同的名称发布在 npm 注册表上。如果完成,则无需修改源代码。

¥On the other hand, node-inspect can be installed locally through a package manager, as it is published on the npm registry under the same name. No source code modification is necessary if that is done.