Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsc-esm-fix

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-esm-fix - npm Package Compare versions

Comparing version 2.4.3 to 2.4.4

4

buildstamp.json
{
"git": {
"commitId": "81b78ae298070d1bb97b1027621135b22be00d2a",
"commitId": "5a499d9443d15524721d56b960bbc08481abcc38",
"repoUrl": "https://github.com/antongolub/tsc-esm-fix",
"repoName": "antongolub/tsc-esm-fix"
},
"date": "2021-08-15T22:34:45.915Z"
"date": "2021-08-17T13:00:55.114Z"
}

@@ -0,1 +1,3 @@

## [2.4.4](https://github.com/antongolub/tsc-esm-fix/compare/v2.4.3...v2.4.4) (2021-08-17)
## [2.4.3](https://github.com/antongolub/tsc-esm-fix/compare/v2.4.2...v2.4.3) (2021-08-15)

@@ -2,0 +4,0 @@

{
"name": "tsc-esm-fix",
"version": "2.4.3",
"version": "2.4.4",
"private": false,

@@ -59,3 +59,3 @@ "publishConfig": {

"fs-extra": "^10.0.0",
"globby": "^12.0.0",
"globby": "^12.0.1",
"json5": "^2.2.0",

@@ -84,3 +84,3 @@ "meow": "^10.1.1",

"terser": "^5.7.1",
"ts-jest": "^27.0.4",
"ts-jest": "^27.0.5",
"typedoc": "^0.21.5",

@@ -87,0 +87,0 @@ "typescript": "4.3"

@@ -8,2 +8,3 @@ # tsc-esm-fix

[![Test Coverage](https://api.codeclimate.com/v1/badges/795c6c62e875c263e2fa/test_coverage)](https://codeclimate.com/github/antongolub/tsc-esm-fix/test_coverage)
[![npm (tag)](https://img.shields.io/npm/v/tsc-esm-fix)](https://www.npmjs.com/package/tsc-esm-fix)

@@ -18,9 +19,10 @@ ### Motivation

### Features
* Finds and replaces `__dirname` and `__filename` refs with `import.meta`.
* Injects extensions to imports/re-exports statements.
* `import {foo} from './foo'` → `import {foo} from './foo.js'`
* `import {baz} from 'external/baz'` → `import {baz} from 'external/baz.js'`
* Note, [including the file extension is only necessary for packages without an "exports" field](https://nodejs.org/api/esm.html#esm_packages). So in this case all the external refs remain as are.
* Pays attention to index files: `import {bar} from './bar'` → `import {bar} from './bar/index.js'`
* Follows `outDir` found in **tsconfig.json**.
* Changes file extensions if specified by opts.
* Finds and replaces `__dirname` and `__filename` refs with `import.meta`.
* Changes file extensions (applied to local deps only).
* Supports Windows-based runtimes.

@@ -27,0 +29,0 @@

@@ -1,2 +0,2 @@

import { basename,dirname, resolve } from 'path'
import { basename, dirname, resolve } from 'path'

@@ -3,0 +3,0 @@ import { IFixOptions, IFixOptionsNormalized } from './interface'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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