@embroider/legacy-inspector-support

中文文档
0.1.3发布于 2025/10/07MITTypeScriptES Module构建来源已验证近 30 天下载 24.5万

Module that installs globals ember-inspector support

原始使用文档
文档目录3 节
  1. Installation
  2. Usage
  3. Development

@embroider/legacy-inspector-support

This package provides a compat integration to allow the ember-inspector to load modules provided by ember-source. This implementation is intended to be a legacy feature and should be phased out as the inspector starts to consume public APIs from ember-source instead of importing modules directly.

Installation

ember install @embroider/legacy-inspector-support

Usage

For any app with an ember-source version >=4.12 you need to import the setupInspector() function from @embroider/legacy-inspector-support/ember-source-4.12 and pass your Application subclass into the function.

import Application from '@ember/application';
import compatModules from '@embroider/virtual/compat-modules';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

// import the setupInspector() function
import setupInspector from '@embroider/legacy-inspector-support/ember-source-4.12';

export default class App extends Application {
  modulePrefix = config.modulePrefix;
  podModulePrefix = config.podModulePrefix;
  Resolver = Resolver.withModules(compatModules);
  
  // setup inspector for this application
  inspector = setupInspector(this);
}

loadInitializers(App, config.modulePrefix, compatModules);

If you are on ember-source version 4.8 you can import the same function from @embroider/legacy-inspector-support/ember-source-4.8 and for all older versions of ember-source you can import from @embroider/legacy-inspector-support/ember-source-3.28

Development

This package is written in JS and uses "type": "module" so it is ESM only. Types are being automatically built from the @jsdoc comments in the JS code.

版本与发布记录

@embroider/legacy-inspector-support 共发布 4 个版本,首次发布于 2025/09/30;过去 12 个月发布了 0 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.3latest2025/10/071.1 年前
0.1.22025/10/031.1 年前
0.1.12025/10/011.1 年前
0.0.02025/09/301.1 年前

关于 @embroider/legacy-inspector-support 的常见问题

@embroider/legacy-inspector-support 是什么?

Module that installs globals ember-inspector support

如何安装 @embroider/legacy-inspector-support?

在项目目录运行 npm install @embroider/legacy-inspector-support,或使用 pnpm add / yarn add / bun add。

@embroider/legacy-inspector-support 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@embroider/legacy-inspector-support 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@embroider/legacy-inspector-support 可以商用吗?

@embroider/legacy-inspector-support 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@embroider/legacy-inspector-support 的下载量有多少?

根据 npm 官方下载统计,@embroider/legacy-inspector-support 在 2026/10/14 – 2026/11/12 这 30 天内被下载 245,399 次,日均约 8,180 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@embroider/legacy-inspector-support 还在维护吗?

最新版本 0.1.3 发布于 2025/10/07(1.1 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/09/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。