Skip to content

Commit

Permalink
Remove non ts-node code
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 29, 2022
1 parent 0140599 commit fd3e4ba
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 137 deletions.
30 changes: 1 addition & 29 deletions index.js
Expand Up @@ -8,9 +8,6 @@ function endsInJsx(filename) {
function endsInTs(filename) {
return filename.endsWith('.ts');
}
function endsInCts(filename) {
return filename.endsWith('.cts');
}
function endsInTsx(filename) {
return filename.endsWith('.tsx');
}
Expand Down Expand Up @@ -428,32 +425,7 @@ var extensions = {
},
},
],
'.cts': [
'ts-node/register',
{
module: '@swc/register',
register: function (hook, config) {
config = config || {
only: [endsInCts],
ignore: [isNodeModules],
jsc: {
parser: {
syntax: 'typescript',
},
},
module: {
type: 'commonjs',
},
};

hook(
Object.assign({}, config, {
extensions: '.cts',
})
);
},
},
],
'.cts': ['ts-node/register'],
'.tsx': [
'ts-node/register',
'sucrase/register/tsx',
Expand Down
5 changes: 0 additions & 5 deletions test/fixtures/cts/1/package.json

This file was deleted.

25 changes: 0 additions & 25 deletions test/fixtures/cts/1/test.cts

This file was deleted.

11 changes: 0 additions & 11 deletions test/fixtures/cts/1/tsconfig.json

This file was deleted.

8 changes: 0 additions & 8 deletions test/fixtures/cts/2/package.json

This file was deleted.

19 changes: 0 additions & 19 deletions test/fixtures/cts/2/test.cts

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/cts/3/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions test/fixtures/cts/3/test.cts

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/cts/4/package.json

This file was deleted.

15 changes: 0 additions & 15 deletions test/fixtures/cts/4/test.cts

This file was deleted.

0 comments on commit fd3e4ba

Please sign in to comment.