Skip to content

Commit

Permalink
chore(repo): fix resolver to not special case powerpack packages
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Dec 18, 2024
1 parent f83e662 commit 6bf9063
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/patched-jest-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ module.exports = function (path, options) {
}
// Try to use the defaultResolver
try {
if (path.startsWith('@nx/')) throw new Error('custom resolution');
// powerpack packages are installed via npm and resolved like any other packages
if (path.startsWith('@nx/') && !path.startsWith('@nx/powerpack-')) {
throw new Error('custom resolution');
}
if (path.startsWith('nx/')) throw new Error('custom resolution');

if (path.indexOf('@nx/workspace') > -1) {
Expand Down
3 changes: 1 addition & 2 deletions tools/workspace-plugin/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable */
export default {
displayName: 'workspace-plugin',
// TODO: For some reason our patched jest resolve cannot work with @nx/powerpack-conformance
// preset: '../../jest.preset.js',
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
Expand Down

0 comments on commit 6bf9063

Please sign in to comment.