-
-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1231 followup: tslint to prettier: apply formatting changes, remove …
…tslint:disable comments (#1251) * results of lint-fix * Remove tslint:disable comments * re-run lint-fix after removing tslint:disable comments
- Loading branch information
Showing
88 changed files
with
2,852 additions
and
2,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import {fileURLToPath} from 'url' | ||
import {createRequire} from 'module' | ||
const require = createRequire(fileURLToPath(import.meta.url)) | ||
import { fileURLToPath } from 'url'; | ||
import { createRequire } from 'module'; | ||
const require = createRequire(fileURLToPath(import.meta.url)); | ||
|
||
/** @type {import('./dist/esm')} */ | ||
const esm = require('./dist/esm') | ||
export const {resolve, getFormat, transformSource} = esm.registerAndCreateEsmHooks() | ||
const esm = require('./dist/esm'); | ||
export const { | ||
resolve, | ||
getFormat, | ||
transformSource, | ||
} = esm.registerAndCreateEsmHooks(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import {fileURLToPath} from 'url' | ||
import {createRequire} from 'module' | ||
const require = createRequire(fileURLToPath(import.meta.url)) | ||
import { fileURLToPath } from 'url'; | ||
import { createRequire } from 'module'; | ||
const require = createRequire(fileURLToPath(import.meta.url)); | ||
|
||
/** @type {import('../dist/esm')} */ | ||
const esm = require('../dist/esm') | ||
export const {resolve, getFormat, transformSource} = esm.registerAndCreateEsmHooks({transpileOnly: true}) | ||
const esm = require('../dist/esm'); | ||
export const { | ||
resolve, | ||
getFormat, | ||
transformSource, | ||
} = esm.registerAndCreateEsmHooks({ transpileOnly: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
module.exports = { | ||
all: true, | ||
include: [ | ||
'tests/node_modules/ts-node/**', | ||
], | ||
exclude: [ | ||
'**/*.d.ts', | ||
'tests/node_modules/ts-node/node_modules/**', | ||
], | ||
include: ['tests/node_modules/ts-node/**'], | ||
exclude: ['**/*.d.ts', 'tests/node_modules/ts-node/node_modules/**'], | ||
excludeNodeModules: false, | ||
excludeAfterRemap: false | ||
excludeAfterRemap: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require('../dist').register({ | ||
files: true | ||
}) | ||
files: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('../').register() | ||
require('../').register(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require('../').register({ | ||
transpileOnly: true | ||
}) | ||
transpileOnly: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require('../').register({ | ||
typeCheck: true | ||
}) | ||
typeCheck: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
// Written in JS to support Windows | ||
// Would otherwise be written as inline bash in package.json script | ||
|
||
const { exec } = require('child_process') | ||
const { mkdtempSync, writeFileSync, readFileSync, unlinkSync, rmdirSync, readdirSync } = require('fs') | ||
const { join } = require('path') | ||
const { exec } = require('child_process'); | ||
const { | ||
mkdtempSync, | ||
writeFileSync, | ||
readFileSync, | ||
unlinkSync, | ||
rmdirSync, | ||
readdirSync, | ||
} = require('fs'); | ||
const { join } = require('path'); | ||
|
||
const testDir = join(__dirname, '../tests') | ||
const tarballPath = join(testDir, 'ts-node-packed.tgz') | ||
const tempDir = mkdtempSync(join(testDir, 'tmp')) | ||
exec(`npm pack --ignore-scripts "${join(__dirname, '..')}"`, { cwd: tempDir }, (err, stdout) => { | ||
if (err) { | ||
console.error(err) | ||
process.exit(1) | ||
const testDir = join(__dirname, '../tests'); | ||
const tarballPath = join(testDir, 'ts-node-packed.tgz'); | ||
const tempDir = mkdtempSync(join(testDir, 'tmp')); | ||
exec( | ||
`npm pack --ignore-scripts "${join(__dirname, '..')}"`, | ||
{ cwd: tempDir }, | ||
(err, stdout) => { | ||
if (err) { | ||
console.error(err); | ||
process.exit(1); | ||
} | ||
const tempTarballPath = join(tempDir, readdirSync(tempDir)[0]); | ||
writeFileSync(tarballPath, readFileSync(tempTarballPath)); | ||
unlinkSync(tempTarballPath); | ||
rmdirSync(tempDir); | ||
} | ||
const tempTarballPath = join(tempDir, readdirSync(tempDir)[0]) | ||
writeFileSync(tarballPath, readFileSync(tempTarballPath)) | ||
unlinkSync(tempTarballPath) | ||
rmdirSync(tempDir) | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import { main } from './bin' | ||
import { main } from './bin'; | ||
|
||
main(undefined, { '--cwd-mode': true }) | ||
main(undefined, { '--cwd-mode': true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#!/usr/bin/env node | ||
|
||
import { main } from './bin' | ||
import { main } from './bin'; | ||
|
||
console.warn( | ||
'ts-script has been deprecated and will be removed in the next major release.', | ||
'Please use ts-node-script instead' | ||
) | ||
); | ||
|
||
main(undefined, { '--script-mode': true }) | ||
main(undefined, { '--script-mode': true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import { main } from './bin' | ||
import { main } from './bin'; | ||
|
||
main(undefined, { '--script-mode': true }) | ||
main(undefined, { '--script-mode': true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import { main } from './bin' | ||
import { main } from './bin'; | ||
|
||
main(undefined, { '--transpile-only': true }) | ||
main(undefined, { '--transpile-only': true }); |
Oops, something went wrong.