# bump-cdk

> Easily manage AWS CDK Dependencies

Latest version **0.1.8** (published 2020-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install bump-cdk
pnpm add bump-cdk
yarn add bump-cdk
bun add bump-cdk
```

Provides the command `bump-cdk`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2020-07-15 |
| First published | 2020-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Joe Snell |
| Maintainers | wulfmann |
| Keywords | aws, aws-cdk, cdk, version-management, cli, tool |

## Links

- npm: https://www.npmjs.com/package/bump-cdk
- Repository: https://github.com/cdk-tools/bump-cdk
- Homepage: https://github.com/cdk-tools/bump-cdk#readme
- Issues: https://github.com/cdk-tools/bump-cdk/issues
- npm.io page: https://npm.io/package/bump-cdk

## Dependencies (3)

- [arg](https://npm.io/package/arg.md) ^4.1.3
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [package-json](https://npm.io/package/package-json.md) ^6.5.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2020-07-15
- 0.1.7 — 2020-07-15
- 0.1.6 — 2020-07-15
- 0.1.5 — 2020-07-15
- 0.1.4 — 2020-07-15
- 0.1.3 — 2020-07-15
- 0.1.2 — 2020-07-15
- 0.1.1 — 2020-07-15
- 0.1.0 — 2020-07-15

## README

# bump-cdk

## Quickstart

Run `bump-cdk` in a directory with a `package.json` that contains [AWS CDK Dependencies](). After running, you should see your cdk dependencies pinned and updated!

```bash
$ npm i -g bump-cdk
or
$ yarn global add bump-cdk
or
$ npx bump-cdk
```

## Why does this exist

A common issue when working with [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/home.html) is a version mismatch issue. Because of the way CDK's modules interface together, they must always be on the same version as each other [More Information](https://docs.aws.amazon.com/cdk/latest/guide/troubleshooting.html#troubleshooting_modules).

This for example might cause an error:

```json
{
  "dependencies": {
    "@aws-cdk/core": "1.30.0",
    "@aws-cdk/aws-lambda": "1.51.0"
  }
}
```

This introduces maintenance overhead by forcing you to always have your CDK dependencies matching.

Additionally, because of NPM/Yarn behavior, when you add dependencies, you often end up with fluid version ranges. [More Information](https://docs.npmjs.com/files/package.json#dependencies).

Example:

```bash
$ yarn add @aws-cdk/core
{
    "dependencies": {
        "@aws-cdk/core": "^1.30.0"
    }
}
```

This means that the module is "Compatible with version" `1.30.0`, but this version will be set in the lockfile, and dependencies added at a later date can get out of sync.

As a result of this, [it is recommended](https://github.com/aws/aws-cdk/issues/3711) to pin the versions without the semver range modifier.

## Usage

### Cli

```bash
Usage
  $ bump-cdk <project-directory>
Options
  --version, -v            Outputs the version of bump-cdk
  --explicit-version, -e   Version to set cdk to
  --dry-run                Outputs changes, but doesn't modify any files
  --help, -h               Displays this message
  --debug, -d              Enable verbose logging
```

### Programatic

Minimal Example:

```typescript
import { bumpCdk } from 'bump-cdk';

await bumpCdk(process.cwd());
```

This defaults `debug` and `dryRun` mode as well as pulls the latest version of `aws-cdk` from NPM and sets all dependencies to that version.

You can also pass in some other options:

```typescript
import { bumpCdk } from 'bump-cdk';

await bumpCdk(process.cwd(), '1.51.0', true, true);
```

This enables `debug` mode and `dryRun` mode as well as sets the specific version of `aws-cdk` to use.

## Contributing

Pull requests welcome!

---
_Source: https://npm.io/package/bump-cdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
