Skip to content

Commit

Permalink
Use read-pkg-up to get version number.
Browse files Browse the repository at this point in the history
Previously we read the version number from `package.json` by reading from a specific file path. To do this we had to set `resolveJsonModule` to `true`.

This resulted in `lib` going from:

```
lib
 |_index.js
 |_package.json
```

to:

```
lib
 |_src
 | |_index.js
 | |_package.json
 |_package.json
```

This impacts import statements. From:

```
import { GuAutoScalingGroup } from "@guardian/cdk/lib/constructs/autoscaling";
```

to:

```
import { GuAutoScalingGroup } from "@guardian/cdk/lib/src/constructs/autoscaling";
```

Using read-pkg-up means we do not need to set `resolveJsonModule` and can keep the old `lib` structure and sane import paths.
  • Loading branch information
akash1810 committed Feb 4, 2021
1 parent 6c19e43 commit 0828903
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 76 deletions.
Loading

0 comments on commit 0828903

Please sign in to comment.