Skip to content

Commit e491844

Browse files
committed
All codemods are downloaded relative to the cli source dir
1 parent ebd6cd3 commit e491844

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.changeset/nine-nails-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codeshift/cli': minor
3+
---
4+
5+
Codemods and dependencies are downloaded relative to the CLI package installation for consistency/stability reasons

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
'@codeshift/(.*)$': '<rootDir>/packages/$1/src',
1919
},
2020
testPathIgnorePatterns: [
21+
'.tmp/',
2122
'/node_modules/',
2223
'/plugin_packages/',
2324
'<rootDir>/packages/initializer/template/',

packages/cli/src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import path from 'path';
12
import semver from 'semver';
23
import chalk from 'chalk';
34
import ora from 'ora';
@@ -18,7 +19,10 @@ function getCodeshiftPackageName(packageName: string) {
1819
}
1920

2021
export default async function main(paths: string[], flags: Flags) {
21-
const packageManager = new PluginManager();
22+
const packageManager = new PluginManager({
23+
pluginsPath: path.join(__dirname, '.plugin_packages'),
24+
});
25+
2226
let transforms: string[] = [];
2327

2428
if (!flags.transform && !flags.packages) {

0 commit comments

Comments
 (0)