Socket
Socket
Sign inDemoInstall

typescript-transform-paths

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-transform-paths - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [2.2.4](https://github.com/LeDDGroup/typescript-transform-paths/compare/v2.2.3...v2.2.4) (2021-05-20)
### Bug Fixes
* Implicit 'index' was written to output filename for imports (fixes [#105](https://github.com/LeDDGroup/typescript-transform-paths/issues/105)) ([4803cd2](https://github.com/LeDDGroup/typescript-transform-paths/commit/4803cd212c20785c74e534366fddc5c62f3a4d89))
### [2.2.3](https://github.com/LeDDGroup/typescript-transform-paths/compare/v2.2.2...v2.2.3) (2021-02-02)

@@ -7,0 +14,0 @@

14

dist/utils/resolve-path-update-node.js

@@ -90,5 +90,13 @@ "use strict";

}
// Remove extension if implicit
if (extension && implicitExtensions.includes(extension))
filePath = filePath.slice(0, -extension.length) + maybeGetExplicitExtension(filePath, extension);
/* Fixup filename */
if (extension) {
const isImplicitIndex = path_1.default.basename(filePath, extension) === 'index' &&
path_1.default.basename(moduleName, path_1.default.extname(moduleName)) !== 'index';
// Remove implicit index
if (isImplicitIndex)
filePath = path_1.default.dirname(filePath);
// Remove implicit extension
else if (implicitExtensions.includes(extension))
filePath = filePath.slice(0, -extension.length) + maybeGetExplicitExtension(filePath, extension);
}
return filePath[0] === "." || general_utils_1.isURL(filePath) ? filePath : `./${filePath}`;

@@ -95,0 +103,0 @@ }

{
"name": "typescript-transform-paths",
"version": "2.2.3",
"version": "2.2.4",
"description": "Transforms module resolution paths using TypeScript path mapping",

@@ -65,3 +65,3 @@ "keywords": [

"standard-version": "^8.0.1",
"ts-expose-internals": "^4.1.2",
"ts-expose-internals": "^4.2.3",
"ts-jest": "^24.0.2",

@@ -71,3 +71,3 @@ "ts-node": "^8.10.2",

"ttypescript": "^1.5.6",
"typescript": "^4.1.2"
"typescript": "4.2.3"
},

@@ -74,0 +74,0 @@ "peerDependencies": {

@@ -35,2 +35,3 @@ # typescript-transform-paths

},
// Note: In order to transform *both* js and d.ts files, you need to add both of the below lines to plugins
"plugins": [

@@ -37,0 +38,0 @@ // Transform paths in output .js files

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc