aws / aws/aws-cdk

Change Alpha module versioning to support declaring version ranges

Open
#28,558 7 comments 7 reactions 0 assignees View on GitHub
@aws-cdk/core effort/medium feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

This is a request to change the versioning scheme for alpha modules to enable declaring version ranges to facilitate package updates.

### Use Case

In my `package.json`, I declare the required CDK package versions using ranges to facilitate my later updates using commands like `npm outdated` and `npm update --save` (either manually or using automated tools e.g. Dependabot that do those updates).

For example, `package.json` would have entries like
```
"@aws-cdk/aws-glue-alpha": "^2.114.1-alpha.0",
"aws-cdk-lib": "^2.114.1",
```

and then running `npm outdated`, I'd get
```
Package Current Wanted Latest Location
@aws-cdk/aws-glue-alpha 2.114.1-alpha.0 2.114.1-alpha.0 2.117.0-alpha.0 node_modules/@aws-cdk/aws-glue-alpha
aws-cdk-lib 2.114.1 2.117.0 2.117.0 node_modules/aws-cdk-lib
```

### Proposed Solution

I did come across a previous discussion about this in https://github.com/aws/aws-cdk/issues/15581 and it seems like the decision was made to use `2.x.y-alpha.z`.

As I saw in the comments that the team considered this as a 2-way door, I'm opening this request, to maybe have a new discussion, now that those alpha packages have been out there in the wild for a while, and that there might be additional insights.

My proposed solution - for the simple version range declaration I wanted to do - is to use `2.x.y` versioning scheme (even if they're not the same as `aws-cdk-lib`).

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.114.1

### Environment details (OS name and version, etc.)

macOS

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the prior discussion in issue #15581 and the alpha package version declarations shown in package.json. Reproduce the reported behavior with npm outdated and npm update --save using the example ranges. Done means the agreed versioning scheme supports useful package ranges without breaking the published alpha packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.