Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TypeStrong/ts-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: TypeStrong/ts-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.1
Choose a head ref
  • 4 commits
  • 2 files changed
  • 3 contributors

Commits on Feb 12, 2017

  1. Copy the full SHA
    cf60fd5 View commit details

Commits on Mar 18, 2017

  1. Copy the full SHA
    f9fb954 View commit details

Commits on Mar 21, 2017

  1. Copy the full SHA
    721641e View commit details
  2. 2.1.1

    blakeembrey committed Mar 21, 2017
    Copy the full SHA
    da704f7 View commit details
Showing with 8 additions and 7 deletions.
  1. +3 −3 package.json
  2. +5 −4 src/index.ts
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-node",
"version": "2.1.0",
"version": "2.1.1",
"preferGlobal": true,
"description": "TypeScript execution environment and REPL for node",
"main": "dist/index.js",
@@ -54,7 +54,7 @@
"rimraf": "^2.5.4",
"semver": "^5.1.0",
"tslint": "^4.0.2",
"tslint-config-standard": "^3.0.0",
"tslint-config-standard": "^4.0.0",
"typescript": "^2.1.4",
"typings": "^2.0.0"
},
@@ -67,7 +67,7 @@
"mkdirp": "^0.5.1",
"pinkie": "^2.0.4",
"source-map-support": "^0.4.0",
"tsconfig": "^5.0.2",
"tsconfig": "^6.0.0",
"v8flags": "^2.0.11",
"xtend": "^4.0.0",
"yn": "^1.2.0"
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ export function parse (value: string | undefined) {
/**
* Replace backslashes with forward slashes.
*/
export function slash (value: string): string {
export function normalizeSlashes (value: string): string {
return value.replace(/\\/g, '/')
}

@@ -386,7 +386,7 @@ export function register (options: Options = {}): () => Register {
* Check if the filename should be ignored.
*/
function shouldIgnore (filename: string, ignore: RegExp[], service: () => Register) {
const relname = slash(filename)
const relname = normalizeSlashes(filename)

return ignore.some(x => x.test(relname))
}
@@ -445,14 +445,15 @@ function readConfig (compilerOptions: any, project: string | boolean | undefined
delete result.config.compilerOptions.outFile
delete result.config.compilerOptions.declarationDir

const basePath = result.path ? dirname(result.path) : cwd
const configPath = result.path && normalizeSlashes(result.path)
const basePath = configPath ? dirname(configPath) : normalizeSlashes(cwd)

if (typeof ts.parseConfigFile === 'function') {
return ts.parseConfigFile(result.config, ts.sys, basePath)
}

if (typeof ts.parseJsonConfigFileContent === 'function') {
return ts.parseJsonConfigFileContent(result.config, ts.sys, basePath, null, result.path as string)
return ts.parseJsonConfigFileContent(result.config, ts.sys, basePath, null, configPath as string)
}

throw new TypeError('Could not find a compatible `parseConfigFile` function')