Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 📦 update dependency jest-preset-angular to v10 - autoclosed #220

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 16, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jest-preset-angular (source) 8.4.0 -> 10.1.0 age adoption passing confidence

Release Notes

thymikee/jest-preset-angular

v10.1.0

Compare Source

Bug Fixes
Code Refactoring
  • transformers use Angular downlevel-ctor transformer (#​1099) (3c26aba)
  • transformers remove workaround for ts < 4.0 in replace-resource transformer (#​1100) (ce68298)
  • transformers migrate html-comment to new Jest serializer (#​1114) (3005330)

v10.0.1

Compare Source

Bug Fixes
  • utils: allow skipping ngcc-jest-processor via some Jest args (#​1013) (7d3a712)

v10.0.0

Compare Source

Build

BREAKING CHANGES

Angular 9 is no longer supported, see https://angular.io/guide/releases#support-policy-and-schedule The minimum support Angular version now is 10

9.0.7 (2021-08-20)

Bug Fixes

9.0.6 (2021-08-17)

Bug Fixes
  • config: set allowJs: true internally always (#​976) (9900c8b), closes #​974
  • utils: throw error when cannot find @angular/core for ngcc-jest-preprocessor util (#​981) (c35d3f2)

9.0.5 (2021-07-22)

Features
Code Refactoring
  • remove webpack and @angular-devkit/build-angular from peer dependencies and optional dependencies (#​973) (ce7fc60)

9.0.4 (2021-06-15)

Bug Fixes

9.0.3 (2021-06-08)

Bug Fixes
  • add missing @angular/platform-browser-dynamic to peer dep (c1729e4)

9.0.2 (2021-06-06)

Bug Fixes

9.0.1 (2021-05-28)

Bug Fixes

v9.0.7

Compare Source

Bug Fixes

v9.0.6

Compare Source

Bug Fixes
  • config: set allowJs: true internally always (#​976) (9900c8b), closes #​974
  • utils: throw error when cannot find @angular/core for ngcc-jest-preprocessor util (#​981) (c35d3f2)

v9.0.5

Compare Source

Features
Code Refactoring
  • remove webpack and @angular-devkit/build-angular from peer dependencies and optional dependencies (#​973) (ce7fc60)

v9.0.4

Compare Source

Bug Fixes

v9.0.3

Compare Source

Bug Fixes
  • add missing @angular/platform-browser-dynamic to peer dep (c1729e4)

v9.0.2

Compare Source

Bug Fixes

v9.0.1

Compare Source

Bug Fixes

v9.0.0

Compare Source

Bug Fixes
Features
Performance Improvements
  • compiler: reuse cacheFS from jest to reduce file system reading (#​679) (f5d9d4b)
  • config: set skipLibCheck: true if not defined in tsconfig (#​678) (0df3ce1)

BREAKING CHANGES

  • Drop support for Angular < 9.0, see https://angular.io/guide/releases#support-policy-and-schedule.
  • Drop support for Node.js version 10 since it becomes EOL on 2021-04-30. Required Node version now is >=12.13.0.
  • Require Jest 27.
  • Users who are using import 'jest-preset-angular' should change to import 'jest-preset-angular/setup-jest'
  • transformers: The AST transformers InlineFilesTransformer and StripStylesTransformer are REMOVED and
    default jest-preset-angular uses AST transformers from @angular/compiler-cli and @ngtools/webpack.
    One should remove the old transformers from the jest config.
  • compiler: jest-preset-angular now switches to default to use its own transformer which wraps around ts-jest to transform codes.

Users who are currently doing in jest config

// jest.config.js
module.exports = {
    // [...]
    transform: {
      '^.+\\.(ts|js|html)$': 'ts-jest',
    },
}

should change to

// jest.config.js
module.exports = {
    // [...]
    transform: {
      '^.+\\.(ts|js|html)$': 'jest-preset-angular',
    },
}
  • serializers:: snapshot serializer paths have been changed:
    • 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js' is changed to 'jest-preset-angular/build/serializers/no-ng-attributes.
    • 'jest-preset-angular/build/AngularSnapshotSerializer.js' is changed to 'jest-preset-angular/build/serializers/ng-snapshot.
    • 'jest-preset-angular/build/HTMLCommentSerializer.js' is changed to 'jest-preset-angular/build/serializers/html-comment.
  • When generating a new project from Angular CLI, by default the tsconfig.json doesn't contain any path mappings
    hence removing moduleNameMapper from preset will make sure that the preset works in pair with tsconfig.json.
    Ones who are relying on the value of moduleNameMapper from the preset should create their own moduleNameMapper
    config manually or via ts-jest util https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping.

If you wish to reuse the old configuration of moduleNameMapper, you can put this into your Jest config

moduleNameMapper: {
  '^src/(.*)$': '<rootDir>/src/$1',
  '^app/(.*)$': '<rootDir>/src/app/$1',
  '^assets/(.*)$': '<rootDir>/src/assets/$1',
  '^environments/(.*)$': '<rootDir>/src/environments/$1',
}
  • By default, if skipLibCheck is not defined in tsconfig, jest-preset-angular will set it to true. If one wants to have it as false, one can set explicitly in tsconfig.
  • compiler: jest-preset-angular now switches to default to use its own transformer which wraps around ts-jest to transform codes.

Users who are currently doing in jest config

// jest.config.js
module.exports = {
    // [...]
    transform: {
      '^.+\\.(ts|js|html)$': 'ts-jest',
    },
}

should change to

// jest.config.js
module.exports = {
    // [...]
    transform: {
      '^.+\\.(ts|js|html)$': 'jest-preset-angular',
    },
}

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled due to failing status checks.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate
Copy link
Contributor Author

renovate bot commented Sep 16, 2021

Branch automerge failure

This PR was configured for branch automerge, however this is not possible so it has been raised as a PR instead.


  • Branch has one or more failed status checks

@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch 14 times, most recently from 3cb57b8 to b241171 Compare September 23, 2021 04:55
@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch 15 times, most recently from 0dbbda2 to 50efeb5 Compare September 30, 2021 03:13
@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch 11 times, most recently from c71efe3 to fe069ec Compare November 7, 2021 02:18
@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch 9 times, most recently from eb330e3 to 99f49b9 Compare November 14, 2021 02:23
@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch 5 times, most recently from 5c209cc to ccec13c Compare November 17, 2021 04:36
@renovate renovate bot force-pushed the renovate/jest-preset-angular-10.x branch from ccec13c to 5bafd55 Compare November 18, 2021 03:58
@renovate renovate bot changed the title chore: 📦 update dependency jest-preset-angular to v10 chore: 📦 update dependency jest-preset-angular to v10 - autoclosed Nov 18, 2021
@renovate renovate bot closed this Nov 18, 2021
@renovate renovate bot deleted the renovate/jest-preset-angular-10.x branch November 18, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant