Skip to content

Commit

Permalink
fix: Pinning jestVersion to ^27 by default (projen#1803)
Browse files Browse the repository at this point in the history
fixes projen#1801 

This will pin the jestVersion to ^27 to resolve compat problems. This should be reverted in the future when ts-jest and jest become more compatible.

---
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
mbonig authored Apr 27, 2022
1 parent d9d14f3 commit e366ac0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 28 deletions.
7 changes: 4 additions & 3 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/javascript/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export class Jest {

const jestDep = options.jestVersion
? `jest@${options.jestVersion}`
: "jest";
: "jest@^27"; // pinning at version 27 for now because of an issue: https://github.com/projen/projen/issues/1801
project.addDevDeps(jestDep);

this.jestConfig = options.jestConfig;
Expand Down
36 changes: 20 additions & 16 deletions test/__snapshots__/integ.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/javascript/__snapshots__/node-project.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/javascript/upgrade-dependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test("upgrades command doesn't include ignored packages", () => {
},
});

const deps = "jest jest-junit npm-check-updates projen standard-version dep1";
const deps = "jest-junit jest npm-check-updates projen standard-version dep1";

const tasks = synthSnapshot(project)[TaskRuntime.MANIFEST_FILE].tasks;
expect(tasks.upgrade.steps[7].exec).toStrictEqual(`yarn upgrade ${deps}`);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e366ac0

Please sign in to comment.