-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Description
Line 47 in 35915f8
| "@activeadmin/activeadmin": "^3.3.0", |
Expected behavior
A package.json isupposed to exist for the node package, not for the application hosting it
Actual behavior
Active admin self-references itself (with a wrong version for 4.x).
Probably this has been somehow introduced in f79eabd by mistake by me
Copilot's take
I still think this is very likely a mistake. The package.json you linked shows the package's name is "@activeadmin/activeadmin" (line 2) and it lists the exact same string in dependencies (line 47). That is a self-dependency.
Why that’s problematic
- npm/yarn resolve dependencies from the registry, not from your working tree. Installing this package from source can cause the package manager to fetch the published @activeadmin/activeadmin@^3.3.0 from the registry instead of using the local code.
- It will create a nested/duplicate copy of the package (the published ^3.3.0) under node_modules, which is confusing and can lead to runtime/version-mismatch bugs.
- It’s semantically redundant: a package doesn’t need to depend on itself. It also creates a circular/self reference which offers no benefit in normal setups.
When it might be intentional
- If there were two different packages with the same scope but different names (e.g., @activeadmin/core vs @activeadmin/activeadmin) a dependency would make sense — but here the names are identical.
- In a monorepo you might depend on another workspace package; that still requires a different package name or using workspace:file: or workspace: protocol. It would not use the same package name as the current package.json.
What I recommend
- Remove the "@activeadmin/activeadmin": "^3.3.0" entry unless there is a documented reason for it.
- If they intended to depend on a different package, change the dependency to the correct package name/version.
- If they intended to require a peer-provided version, use peerDependencies.
- If you want, I can: (a) search the git history to see who/when this line was added, or (b) prepare a small PR to remove it. Which would you prefer?
Metadata
Metadata
Assignees
Labels
No labels