Socket
Socket
Sign inDemoInstall

tsconfig-paths

Package Overview
Dependencies
3
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.3 to 3.2.0

test/tsconfig-named.json

7

CHANGELOG.md

@@ -9,2 +9,6 @@ # Change Log

## [3.2.0] - 2018-03-31
### Added
- Added support for passing a filename as cwd, see issue [#31](https://github.com/dividab/tsconfig-paths/issues/31) and PR [#32](https://github.com/dividab/tsconfig-paths/pull/32). Thanks to [@amodm](https://github.com/amodm) for this adding this!
## [3.1.3] - 2018-03-14

@@ -149,3 +153,4 @@ ### Fixed

[Unreleased]: https://github.com/dividab/tsconfig-paths/compare/3.1.3...master
[Unreleased]: https://github.com/dividab/tsconfig-paths/compare/3.2.0...master
[3.2.0]: https://github.com/dividab/tsconfig-paths/compare/3.1.3...3.2.0
[3.1.3]: https://github.com/dividab/tsconfig-paths/compare/3.1.2...3.1.3

@@ -152,0 +157,0 @@ [3.1.2]: https://github.com/dividab/tsconfig-paths/compare/3.1.1...3.1.2

@@ -41,2 +41,5 @@ "use strict";

}
if (fs.statSync(cwd).isFile()) {
return path.resolve(cwd);
}
var configAbsolutePath = walkForTsConfig(cwd);

@@ -43,0 +46,0 @@ return configAbsolutePath ? path.resolve(configAbsolutePath) : undefined;

2

package.json
{
"name": "tsconfig-paths",
"version": "3.1.3",
"version": "3.2.0",
"description": "Load node modules according to tsconfig paths, in run-time or via API.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

import { assert } from "chai";
import {
configLoader,
loadConfig,
ConfigLoaderFailResult,

@@ -76,2 +77,15 @@ ConfigLoaderSuccessResult

});
it("should presume cwd to be a tsconfig file when loadConfig is called with absolute path to tsconfig.json", () => {
// using tsconfig-named.json to ensure that future changes to fix
// https://github.com/dividab/tsconfig-paths/issues/31
// do not pass this test case just because of a directory walk looking
// for tsconfig.json
const configFile = join(__dirname, "tsconfig-named.json");
const result = loadConfig(configFile);
const successResult = result as ConfigLoaderSuccessResult;
assert.equal(successResult.resultType, "success");
assert.equal(successResult.configFileAbsolutePath, configFile);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc