|
1 | | - |
2 | | -import * as coffee from './coffee.js' |
3 | | -import * as ts from 'ts-node/esm' |
| 1 | +import * as coffee from "./coffee.js"; |
| 2 | +import * as ts from "ts-node/esm"; |
4 | 3 |
|
5 | 4 | const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; |
6 | 5 | const tsRegex = /\.ts$/; |
7 | 6 |
|
8 | | -export function resolve(specifier, context, defaultResolve) { |
| 7 | +export function resolve(specifier) { |
9 | 8 | if (coffeeRegex.test(specifier)) { |
10 | | - return coffee.resolve.apply(this, arguments) |
| 9 | + return coffee.resolve.apply(this, arguments); |
11 | 10 | } |
12 | 11 | if (tsRegex.test(specifier)) { |
13 | | - return ts.resolve.apply(this, arguments) |
| 12 | + return ts.resolve.apply(this, arguments); |
14 | 13 | } |
15 | 14 | return ts.resolve.apply(this, arguments); |
16 | 15 | } |
17 | 16 |
|
18 | | -export function getFormat(url, context, defaultGetFormat) { |
| 17 | +export function getFormat(url) { |
19 | 18 | if (coffeeRegex.test(url)) { |
20 | | - return coffee.getFormat.apply(this, arguments) |
| 19 | + return coffee.getFormat.apply(this, arguments); |
21 | 20 | } |
22 | 21 | if (tsRegex.test(url)) { |
23 | | - return ts.getFormat.apply(this, arguments) |
| 22 | + return ts.getFormat.apply(this, arguments); |
24 | 23 | } |
25 | 24 | return ts.getFormat.apply(this, arguments); |
26 | 25 | } |
27 | 26 |
|
28 | | -export function transformSource(source, context, defaultTransformSource) { |
| 27 | +export function transformSource(source, context) { |
29 | 28 | const { url } = context; |
30 | 29 | if (coffeeRegex.test(url)) { |
31 | | - return coffee.transformSource.apply(this, arguments) |
| 30 | + return coffee.transformSource.apply(this, arguments); |
32 | 31 | } |
33 | 32 | if (tsRegex.test(url)) { |
34 | | - return ts.transformSource.apply(this, arguments) |
| 33 | + return ts.transformSource.apply(this, arguments); |
35 | 34 | } |
36 | 35 | return ts.transformSource.apply(this, arguments); |
37 | 36 | } |
0 commit comments