Skip to content

Document which dependencies must be installed, and which must not - #2234

Open
NullVoxPopuli wants to merge 1 commit into
masterfrom
nvp/dependencies
Open

Document which dependencies must be installed, and which must not#2234
NullVoxPopuli wants to merge 1 commit into
masterfrom
nvp/dependencies

Conversation

@NullVoxPopuli

Copy link
Copy Markdown
Contributor

This hasn't been described anywhere, and has been a major point of confusion in the community

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for ember-guides ready!

Name Link
🔨 Latest commit dc88593
🔍 Latest deploy log https://app.netlify.com/projects/ember-guides/deploys/6a8738a6ec8be200086a4a2e
😎 Deploy Preview https://deploy-preview-2234--ember-guides.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.


### `@glimmer/*`

- `@glimmer/tracking`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swear we were chasing down a few other @\glimmer/* ones before.. maybe runtime?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a bunch more glimmer packages provided from build-plugins + ember-source, but I haven't listed them here because they aren't public

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ember-source/package.json#ember-addon.renamed-modules is the source of truth tho

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the latest release has this:

"@glimmer/destroyable/index.js": "ember-source/@glimmer/destroyable/index.js",
      "@glimmer/encoder/index.js": "ember-source/@glimmer/encoder/index.js",
      "@glimmer/env/index.js": "ember-source/@glimmer/env/index.js",
      "@glimmer/global-context/index.js": "ember-source/@glimmer/global-context/index.js",
      "@glimmer/manager/index.js": "ember-source/@glimmer/manager/index.js",
      "@glimmer/node/index.js": "ember-source/@glimmer/node/index.js",
      "@glimmer/opcode-compiler/index.js": "ember-source/@glimmer/opcode-compiler/index.js",
      "@glimmer/owner/index.js": "ember-source/@glimmer/owner/index.js",
      "@glimmer/program/index.js": "ember-source/@glimmer/program/index.js",
      "@glimmer/reference/index.js": "ember-source/@glimmer/reference/index.js",
      "@glimmer/runtime/index.js": "ember-source/@glimmer/runtime/index.js",
      "@glimmer/tracking/index.js": "ember-source/@glimmer/tracking/index.js",
      "@glimmer/tracking/primitives/cache/index.js": "ember-source/@glimmer/tracking/primitives/cache/index.js",
      "@glimmer/util/index.js": "ember-source/@glimmer/util/index.js",
      "@glimmer/validator/index.js": "ember-source/@glimmer/validator/index.js",
      "@glimmer/vm/index.js": "ember-source/@glimmer/vm/index.js",
      "@glimmer/wire-format/index.js": "ember-source/@glimmer/wire-format/index.js",

claude just tried to tell me I needed to install @glimmer/validator due to type compilation issue, we should at least make sure the full list (including private) is included somewhere like a skill we can have things pick it up easily

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No normal person should be concerned with thase packages tho. Experts, such as yourself, can have expert knowledge, like how to solve the issue you described.

However, the types for all glimmer packages are provided by ember-source, provided your default ember-source is new enough.

My fear is that including everything will mislead AI and it'll try to 'be clever', and lead users astray

@NullVoxPopuli

NullVoxPopuli commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

The lint is complaining about the

Important

text here

> [!important]
> text here

which is valid -- so... maybe the linter is wrong?

or the renderer for the markdown syntax is out of date?

@bertdeblock

Copy link
Copy Markdown
Contributor

Also needs an entry here @NullVoxPopuli.


## Must be present in package.json

These packages are not provided automatic by any build tooling, and exist as standalone packages on npm.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These packages are not provided automatic by any build tooling, and exist as standalone packages on npm.
These packages are not provided automatically by any build tooling, and exist as standalone packages on npm.




## Must be present in package.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be present where? as deps or devdeps?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, I think this section should clarify it is re-emphasizing the base rule of "if import -> must declare"

The previous section were the exceptions, and here we're extra-clarifying certain packages that look similar to the exceptions do need to be declared.

So something like:

"These packages, despite looking very similar to some of the packages that are provided by the build tooling, do need to be declared, just like any other module import that is not in the list above."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be present where? as deps or devdeps?

Doesn't matter for apps,
Dependencies for libraries

> If you import it, you must declare it (in `dependencies` or `peerDependencies` in your package.json)


## Available via build tools

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should explicitly clarify that these dependencies do not need to be declared in the deps. "Available via build tools" does not mean much to a new user.

Not all modules need to be declared in the package.json, but for the most part

> [!important]
> If you import it, you must declare it (in `dependencies` or `peerDependencies` in your package.json)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs clarification, cause otherwise this contradicts the previous sentence. The "for the most part" isn't really cutting it.

something along the lines of:

"As a ground rule, every module that's imported needs to be declared either in dependencies or peerDependencies. However, there are some exceptions, where the imported modules are provided by the ember build tooling instead of the normal package resolution.

This document describes those exceptions."


### Other / Supporting

- `@embroider/macros` (requires babel)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "requires babel" is a bit out of left field - does that mean babel needs to be a dep? devDep? Isn't babel always required anyway?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some libraries don't seed babel, is all

@abeforgit

abeforgit commented Aug 21, 2026

Copy link
Copy Markdown

While it may not have been the initial intention, I feel like this doc would also be the place to explain what to do with the ember-source dependency. Peerdep yes/no (I've heard no, but I still need more explanation than "because the ecosystem is borked")

EDIT: I mention this cause I thought the document targeted addon devs, but it actually doesn't mention who it's for, which usually means it's meant for app devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants