apollographql / apollographql/apollo-tooling
Multiple pkg versions in tree. Request: release current `apollo-language-server`
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
This `renovate` PR https://github.com/apollographql/apollo-tooling/pull/2065 for `apollo-language-server` updates the dependency of `@apollo/federation` to the current version `0.19.1`. It has not been released and as a result it is not possible to use the latest versions of `apollo` and `@apollo/federation` without getting two versions of `@apollo/federation`.
Releasing a patch version of `apollo-language-server` would fix this.
## Related Question:
**Why** do all Apollo projects seem to use strict dependency versions? (ex: `@0.19.0` instead of `@~0.19.0`, `@^0.19.0`, etc.) Strict version requirements make maintaining a project that uses Apollo really painful. If `semver` is being followed patch versions should never be cause for conflict. It seems especially confounding to use strict dependencies *within* this project/team's own ecosystem where adherence to `semver` can be assured.
When users try to do package upgrades (or use a bot such as renovate or dependabot) this requires version upgrades must all be done simultaneously or you get an explosion of copies of inner dependencies - even if it would not otherwise be required.
**Intended outcome:**
Projects should be able to only use one version of major packages
**Actual outcome:**
#### `yarn.lock`
```
"@apollo/federation@0.19.0":
version "0.19.0"
resolved "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.19.0.tgz#b0e43f034e31ef391f44be01db3a8ef0e0b4565b"
integrity sha512-8cd8ftHgqaseDTN7RJrROT6FT1xy8RV2Qb9BGhhqPVMHqf08GtidBqQTk6hv1UDR0qu/TRZA6J4Kh7oXeMrPQg==
dependencies:
apollo-graphql "^0.5.0"
apollo-server-env "^2.4.5"
core-js "^3.4.0"
lodash.xorby "^4.7.0"
"@apollo/federation@^0.19.1":
version "0.19.1"
resolved "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.19.1.tgz#4d4f227a2da1efb42f6569114fb0aae7b03af505"
integrity sha512-32l2XoyDZfqwCObm2iazwa2vlsEYHzBLwsoCJccd6pdW8PAoK+IoKWJqNrMTwVYYNvRvd6YI+VtZPGo460GqDA==
dependencies:
apollo-graphql "^0.4.0"
apollo-server-env "^2.4.3"
apollo-graphql "^0.5.0"
apollo-server-env "^2.4.5"
core-js "^3.4.0"
lodash.xorby "^4.7.0"
```
**How to reproduce the issue:**
Put the following dependencies in `package.json`, then run `yarn install`
```
apollo@^2.30.2
@apollo/federation@^0.19.1
@apollo/gateway@^0.19.1
```
**Versions**
```
apollo@^2.30.2
@apollo/federation@^0.19.1
@apollo/gateway@^0.19.1
"@apollo/federation@0.19.0":
version "0.19.0"
resolved "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.19.0.tgz#b0e43f034e31ef391f44be01db3a8ef0e0b4565b"
integrity sha512-8cd8ftHgqaseDTN7RJrROT6FT1xy8RV2Qb9BGhhqPVMHqf08GtidBqQTk6hv1UDR0qu/TRZA6J4Kh7oXeMrPQg==
dependencies:
apollo-graphql "^0.5.0"
apollo-server-env "^2.4.5"
core-js "^3.4.0"
lodash.xorby "^4.7.0"
"@apollo/federation@^0.19.1":
version "0.19.1"
resolved "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.19.1.tgz#4d4f227a2da1efb42f6569114fb0aae7b03af505"
integrity sha512-32l2XoyDZfqwCObm2iazwa2vlsEYHzBLwsoCJccd6pdW8PAoK+IoKWJqNrMTwVYYNvRvd6YI+VtZPGo460GqDA==
dependencies:
apollo-graphql "^0.4.0"
apollo-server-env "^2.4.3"
apollo-graphql "^0.5.0"
apollo-server-env "^2.4.5"
core-js "^3.4.0"
lodash.xorby "^4.7.0"
$ yarn why @apollo/federation
=> Found "@apollo/federation@0.19.1"
info Has been hoisted to "@apollo/federation"
info Reasons this module exists
- Specified in "dependencies"
- Hoisted from "@apollo#gateway#@apollo#federation"
info Disk size without dependencies: "1.54MB"
info Disk size with unique dependencies: "9.23MB"
info Disk size with transitive dependencies: "15.95MB"
info Number of shared dependencies: 29
=> Found "apollo-language-server#@apollo/federation@0.19.0"
info This module exists because "apollo#apollo-language-server" depends on it.
info Disk size without dependencies: "1.51MB"
info Disk size with unique dependencies: "9.21MB"
info Disk size with transitive dependencies: "15.93MB"
info Number of shared dependencies: 29
```
Contributor guide
Research direction
Start by reviewing the linked Renovate PR #2065 and the package.json dependency on @apollo/federation, then inspect yarn.lock and the documented release entry point if available. The work is done when a patch release of apollo-language-server includes the current dependency and the reproduction using yarn install no longer produces two federation versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100