Skip to content

Commit

Permalink
review(ap): reorder steps for package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaskiewicz committed Oct 25, 2023
1 parent a51cf37 commit 09129f4
Showing 1 changed file with 11 additions and 40 deletions.
51 changes: 11 additions & 40 deletions src/testing/jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,10 @@ This allows for 'well known' commits that map directly back to these steps to be

1. **Commit your changes to help your reviewers out - this makes it easier to review changes that are coming down the line.**
Last reminder, please do this after every step.
1. Update any Jest related dependencies to use the targeted version of Jest.
Note: It is up to you to determine/verify the packages needed here.
```bash
$ cd src/testing/jest/jest-29
$ npm i -D jest@29 @types/jest@29
```
Note that all dependencies can simply be dev-dependencies, since they're only used for type checking.
1. Update the name of the package in the newly created directory to reflect the version of Jest it supports.
Do so by replacing the one instance of the package name in `package.json` and two instances in `package-lock-json`.
Following the example above, `@stencil/jest-28` would be replaced with `@stencil/jest-29`.
1. Delete the `package-lock.json` file that was copied into your new directory.
We'll regenerate this later after a few modifications have been made to `package.json` in the next step.
1. Update the name and description of the package in the newly created directory's `pacakge.json` to reflect the version of Jest it supports.
```diff
--- a/src/testing/jest/jest-29/package-lock.json
+++ b/src/testing/jest/jest-29/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "@stencil/jest-28",
+ "name": "@stencil/jest-29",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "@stencil/jest-28",
+ "name": "@stencil/jest-29",
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
diff --git a/src/testing/jest/jest-29/package.json b/src/testing/jest/jest-29/package.json
index 92b5ee419..bd1614fe0 100644
--- a/src/testing/jest/jest-29/package.json
Expand All @@ -66,25 +43,19 @@ This allows for 'well known' commits that map directly back to these steps to be
- "name": "@stencil/jest-28",
+ "name": "@stencil/jest-29",
"version": "1.0.0",
"description": "Internal package for supporting Jest 28 with Stencil",
"license": "MIT",
```
1. Update the description of the package in `package.json` to match the supported version of Jest:
```diff
--- a/src/testing/jest/jest-29/package.json
+++ b/src/testing/jest/jest-29/package.json
@@ -1,7 +1,7 @@
{
"name": "@stencil/jest-29",
"version": "1.0.0",
- "description": "Internal package for supporting Jest 28 with Stencil",
+ "description": "Internal package for supporting Jest 29 with Stencil",
"license": "MIT",
"author": "Ionic Team",
"homepage": "https://stenciljs.com/",

```
1. Update any Jest related dependencies to use the targeted version of Jest.
It is up to you to determine/verify the packages needed here.
```bash
$ cd src/testing/jest/jest-29
$ npm i -D jest@29 @types/jest@29
```
Note: Running `npm install` will regenerate the `package-lock.json` file you deleted in a previous step.
Note: All dependencies can simply be dev-dependencies, since they're only used for type checking.
1. Update `renovate.json` to not bump Jest beyond the version that this directory is responsible for:
```diff
index 4861b2477..7cf75e16d 100644
Expand Down

0 comments on commit 09129f4

Please sign in to comment.