Skip to content

Commit

Permalink
build(deps-dev): downgrade Prettier to 2.x
Browse files Browse the repository at this point in the history
Jest doesn't support yet `toMatchInlineSnapshot` with `Prettier` 3.x
  • Loading branch information
ahnpnl committed Jul 30, 2024
1 parent 4180f06 commit 757327c
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { Hero, HeroService } from '../model';
export class DashboardComponent implements OnInit {
heroes: Hero[] = [];

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {}
constructor(private readonly router: Router, private readonly heroService: HeroService) {}

ngOnInit() {
this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export class HeroListComponent {
heroes: Observable<Hero[]>;
selectedHero!: Hero;

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {
constructor(private readonly router: Router, private readonly heroService: HeroService) {
this.heroes = this.heroService.getHeroes();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { Hero, HeroService } from '../model';
export class DashboardComponent implements OnInit {
heroes: Hero[] = [];

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {}
constructor(private readonly router: Router, private readonly heroService: HeroService) {}

ngOnInit() {
this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5)));
Expand Down
5 changes: 1 addition & 4 deletions examples/example-app-v15/src/app/hero/hero-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export class HeroListComponent {
heroes: Observable<Hero[]>;
selectedHero!: Hero;

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {
constructor(private readonly router: Router, private readonly heroService: HeroService) {
this.heroes = this.heroService.getHeroes();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { Hero, HeroService } from '../model';
export class DashboardComponent implements OnInit {
heroes: Hero[] = [];

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {}
constructor(private readonly router: Router, private readonly heroService: HeroService) {}

ngOnInit() {
this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5)));
Expand Down
5 changes: 1 addition & 4 deletions examples/example-app-v17/src/app/hero/hero-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export class HeroListComponent {
heroes: Observable<Hero[]>;
selectedHero!: Hero;

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {
constructor(private readonly router: Router, private readonly heroService: HeroService) {
this.heroes = this.heroService.getHeroes();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { Hero, HeroService } from '../model';
export class DashboardComponent implements OnInit {
heroes: Hero[] = [];

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {}
constructor(private readonly router: Router, private readonly heroService: HeroService) {}

ngOnInit() {
this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5)));
Expand Down
5 changes: 1 addition & 4 deletions examples/example-app-v18/src/app/hero/hero-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export class HeroListComponent {
heroes: Observable<Hero[]>;
selectedHero!: Hero;

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {
constructor(private readonly router: Router, private readonly heroService: HeroService) {
this.heroes = this.heroService.getHeroes();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ import { Hero, HeroService } from '../model';
export class DashboardComponent implements OnInit {
heroes: Hero[] = [];

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {}
constructor(private readonly router: Router, private readonly heroService: HeroService) {}

ngOnInit() {
this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export class HeroListComponent {
heroes: Observable<Hero[]>;
selectedHero!: Hero;

constructor(
private readonly router: Router,
private readonly heroService: HeroService,
) {
constructor(private readonly router: Router, private readonly heroService: HeroService) {
this.heroes = this.heroService.getHeroes();
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsdoc": "^48.9.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^4.2.1",
"execa": "5.1.1",
"fs-extra": "^11.2.0",
"github-files-fetcher": "^1.6.0",
"glob": "^10.4.5",
"husky": "^9.1.4",
"jest": "^29.7.0",
"pinst": "^3.0.0",
"prettier": "^3.3.3",
"prettier": "^2.8.8",
"rimraf": "^5.0.9",
"rxjs": "^7.8.1",
"ts-node": "^10.9.2",
Expand Down
5 changes: 1 addition & 4 deletions src/compiler/ng-jest-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import { angularJitApplicationTransform } from '../transformers/jit_transform';
import { replaceResources } from '../transformers/replace-resources';

export class NgJestCompiler extends TsCompiler {
constructor(
readonly configSet: ConfigSet,
readonly jestCacheFS: Map<string, string>,
) {
constructor(readonly configSet: ConfigSet, readonly jestCacheFS: Map<string, string>) {
super(configSet, jestCacheFS);

this._logger.debug('created NgJestCompiler');
Expand Down
31 changes: 13 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6202,23 +6202,18 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^5.2.1":
version: 5.2.1
resolution: "eslint-plugin-prettier@npm:5.2.1"
"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.1
resolution: "eslint-plugin-prettier@npm:4.2.1"
dependencies:
prettier-linter-helpers: "npm:^1.0.0"
synckit: "npm:^0.9.1"
peerDependencies:
"@types/eslint": ">=8.0.0"
eslint: ">=8.0.0"
eslint-config-prettier: "*"
prettier: ">=3.0.0"
eslint: ">=7.28.0"
prettier: ">=2.0.0"
peerDependenciesMeta:
"@types/eslint":
optional: true
eslint-config-prettier:
optional: true
checksum: 10/10ddf68215237e327af09a47adab4c63f3885fda4fb28c4c42d1fc5f47d8a0cc45df6484799360ff1417a0aa3c77c3aaac49d7e9dfd145557b17e2d7ecc2a27c
checksum: 10/d387f85dd1bfcb6bc6b794845fee6afb9ebb2375653de6bcde6e615892fb97f85121a7c012a4651b181fc09953bdf54c9bc70cab7ad297019d89ae87dd007e28
languageName: node
linkType: hard

Expand Down Expand Up @@ -8299,7 +8294,7 @@ __metadata:
eslint-plugin-import: "npm:^2.29.1"
eslint-plugin-jest: "npm:^28.6.0"
eslint-plugin-jsdoc: "npm:^48.9.3"
eslint-plugin-prettier: "npm:^5.2.1"
eslint-plugin-prettier: "npm:^4.2.1"
execa: "npm:5.1.1"
fs-extra: "npm:^11.2.0"
github-files-fetcher: "npm:^1.6.0"
Expand All @@ -8309,7 +8304,7 @@ __metadata:
jest-environment-jsdom: "npm:^29.0.0"
jest-util: "npm:^29.0.0"
pinst: "npm:^3.0.0"
prettier: "npm:^3.3.3"
prettier: "npm:^2.8.8"
pretty-format: "npm:^29.0.0"
rimraf: "npm:^5.0.9"
rxjs: "npm:^7.8.1"
Expand Down Expand Up @@ -10306,12 +10301,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.3.3":
version: 3.3.3
resolution: "prettier@npm:3.3.3"
"prettier@npm:^2.8.8":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
bin:
prettier: bin/prettier.cjs
checksum: 10/5beac1f30b5b40162532b8e2f7c3a4eb650910a2695e9c8512a62ffdc09dae93190c29db9107fa7f26d1b6c71aad3628ecb9b5de1ecb0911191099be109434d7
prettier: bin-prettier.js
checksum: 10/00cdb6ab0281f98306cd1847425c24cbaaa48a5ff03633945ab4c701901b8e96ad558eb0777364ffc312f437af9b5a07d0f45346266e8245beaf6247b9c62b24
languageName: node
linkType: hard

Expand Down

0 comments on commit 757327c

Please sign in to comment.