Skip to content

Commit c5c531d

Browse files
author
Daniel Del Core
committed
fixes the -t flag
1 parent 65cfe4f commit c5c531d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/tricky-kids-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codeshift/core': patch
3+
---
4+
5+
Fixes direct transform urls via the --tranform flag

packages/core/lib/Worker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22
'use strict';
33

4+
const path = require('path');
45
const { EventEmitter } = require('events');
56
const async = require('neo-async');
67
const fs = require('graceful-fs');
@@ -56,7 +57,7 @@ function retrievePath(str) {
5657
return str.replace(/[@#][^@#]*$/, '');
5758
}
5859

59-
function setup(entryPath, id, babel) {
60+
function setup(entryPath, babel) {
6061
if (babel === 'babel') {
6162
const presets = [];
6263
if (presetEnv) {
@@ -109,7 +110,7 @@ function setup(entryPath, id, babel) {
109110
}
110111

111112
if (!transformId && !presetId) {
112-
transformModule = require(entryPath);
113+
transformModule = require(path.resolve(entryPath));
113114
}
114115

115116
transform =

0 commit comments

Comments
 (0)