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.20.13 to 2.20.14

4

buildstamp.json
{
"git": {
"commitId": "96906a97e76a8298e257de53ea572975e76d081e",
"commitId": "13c0860d5e310e6e6fb499aa2d55161d280d81f8",
"repoUrl": "https://github.com/antongolub/tsc-esm-fix.git",
"repoName": "antongolub/tsc-esm-fix"
},
"date": "2023-05-02T17:53:45.976Z"
"date": "2023-05-09T18:31:49.623Z"
}

@@ -0,1 +1,8 @@

## [2.20.14](https://github.com/antongolub/tsc-esm-fix/compare/v2.20.13...v2.20.14) (2023-05-09)
### Performance Improvements
* up deps ([13c0860](https://github.com/antongolub/tsc-esm-fix/commit/13c0860d5e310e6e6fb499aa2d55161d280d81f8))
## [2.20.13](https://github.com/antongolub/tsc-esm-fix/compare/v2.20.12...v2.20.13) (2023-05-02)

@@ -2,0 +9,0 @@

{
"name": "tsc-esm-fix",
"version": "2.20.13",
"version": "2.20.14",
"private": false,

@@ -55,6 +55,6 @@ "publishConfig": {

"dependencies": {
"fs-extra": "^11.1.0",
"globby": "^13.1.3",
"fs-extra": "^11.1.1",
"globby": "^13.1.4",
"json5": "^2.2.3",
"meow": "^12.0.0",
"meow": "^12.0.1",
"tslib": "^2.5.0"

@@ -65,23 +65,23 @@ },

"@qiwi/npm-run-all": "^4.1.7",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.3",
"@types/semver": "^7.3.13",
"@types/jest": "^29.5.1",
"@types/node": "^20.1.1",
"@types/semver": "^7.5.0",
"cpy-cli": "^4.2.0",
"cross-env": "^7.0.3",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-qiwi": "^2.1.1",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-qiwi": "^2.1.3",
"glob-runner": "^1.0.6",
"jest": "^29.5.0",
"microbundle": "^0.15.1",
"mkdirp": "^3.0.0",
"prettier": "^2.8.5",
"prettier-config-qiwi": "^2.1.0",
"mkdirp": "^3.0.1",
"prettier": "^2.8.8",
"prettier-config-qiwi": "^2.1.2",
"rimraf": "^5.0.0",
"semver": "^7.3.8",
"semver": "^7.5.0",
"tempy": "^3.0.0",
"terser": "^5.16.6",
"ts-jest": "^29.0.5",
"typedoc": "^0.24.0",
"typescript": "^5.0.2"
"terser": "^5.17.3",
"ts-jest": "^29.1.0",
"typedoc": "^0.24.7",
"typescript": "^5.0.4"
},

@@ -88,0 +88,0 @@ "repository": {

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:path"),require("fs-extra"),require("json5"),require("globby"),require("node:fs")):"function"==typeof define&&define.amd?define(["exports","node:path","fs-extra","json5","globby","node:fs"],n):n((e||self).tscEsmFix={},e.node_path,e.fsExtra,e.json5,e.globby,e.node_fs)}(this,function(e,n,r,t,o,u){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=/*#__PURE__*/i(r),c=/*#__PURE__*/i(t);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l.apply(this,arguments)}var a=function(e){return s.default.readFileSync(e,{encoding:"utf8"})},f=function(e,n){return s.default.outputFileSync(e,n,{encoding:"utf8"})},d=function(e){return c.default.parse(a(e))},m=function(e){return e?Array.isArray(e)?e:[e]:[]},p=s.default.unlinkSync,g=function(e){return e.replace(/\\/g,"/")},v=function e(r){var t=d(r);if(t.extends){var o=e(n.resolve(n.dirname(r),t.extends));return l({},o,t,{compilerOptions:l({},o.compilerOptions,t.compilerOptions)})}return t},b={cwd:process.cwd(),tsconfig:"./tsconfig.json",filenameVar:!0,dirnameVar:!0,ext:!0,unlink:!0,debug:function(){}},h=function(e,r){return m(e).reduce(function(e,t){var o,u,i=v(n.resolve(r,t)),s=null==i||null==(o=i.compilerOptions)?void 0:o.outDir,c=null==i||null==(u=i.compilerOptions)||null==u.module.toLowerCase?void 0:u.module.toLowerCase();return s&&c.startsWith("es")?e.push(s):console.warn("tsconfig should declare `outDir` and `module` type es6 or above"),e},[])},x=function(e,n){return e.map(function(e){return e.endsWith(".d.ts")?e:e.replace(/\.[^./\\]+$/,n)})},y=function(e,r,t,o,u){return e.replace(/(\sfrom\s|[\s(:[](?:import|require)[ (])(["'])([^"']+\/[^"']+|\.{1,2})\/?(["'])/g,function(e,i,s,c,l){return""+i+s+(u.includes(c)?c:function(e,r,t,o){var u=n.dirname(e),i=n.resolve(o,"node_modules"),s=/^\..+\.[^./\\]+$/.test(r)?[r,r.replace(/\.[^./\\]+$/,"")]:[r],c=[".js",".cjs",".mjs"].reduce(function(e,n){return s.forEach(function(r){return e.push(""+r+n,r+"/index"+n)}),e},[]);return c.find(function(e){return t.includes(g(n.resolve(u,e)))})||c.find(function(e){return t.includes(g(n.resolve(i,e)))})||r}(r,c,t,o))+l})},j=function(e,n){return e.replace(/__dirname/g,"`${process.platform === 'win32' ? '' : '/'}${/file:\\/{2,3}(.+)\\/[^/]/.exec(import.meta.url)"+(n?"!":"")+"[1]}`")},P=function(e,n){return e.replace(/__filename/g,"`${process.platform === 'win32' ? '' : '/'}${/file:\\/{2,3}(.+)/.exec(import.meta.url)"+(n?"!":"")+"[1]}`")},O=function(e){return e.includes("export default")?e:e+"\nexport default undefined\n"},_=function(e){return 0===e.trim().length?"\nexport {}\nexport default undefined\n":e},w=function(e,r,t){return r===t?e:e.replace("//# sourceMappingURL="+n.basename(r)+".map","//# sourceMappingURL="+n.basename(t)+".map")},F=function(e,n,r,t,o,u,i){var s=t.dirnameVar,c=t.filenameVar,l=t.fillBlank,a=t.forceDefaultExport,f=t.sourceMap;void 0===o&&(o=n),void 0===u&&(u=!1),void 0===i&&(i=[]);var d=e;return t.ext&&(d=y(d,n,r,t.cwd,i)),s&&(d=j(d,u)),c&&(d=P(d,u)),l&&(d=_(d)),a&&(d=O(d)),f&&(d=w(d,o,n)),d},M=function(e,r){if(!r)return e;var t=r;return t.includes("*")&&(t=t.slice(0,t.indexOf("*"))).includes("/")&&(t=t.slice(0,t.lastIndexOf("/"))),n.join(e,t)};e.DEFAULT_FIX_OPTIONS=b,e.fix=function(e){try{var r=function(e){return l({},b,e,{debug:"function"==typeof(null==e?void 0:e.debug)?e.debug:!0===(null==e?void 0:e.debug)?console.log:b.debug})}(e),t=r.cwd,i=r.target,s=r.src,c=r.tsconfig,v=r.out,y=r.ext,j=r.debug,P=r.unlink,O=r.sourceMap,_=n.resolve(t,void 0===v?t:v),w=m(s),k=[].concat(m(i),h(c,t));j("debug:cwd",t),j("debug:outdir",_),j("debug:sources",w),j("debug:targets",k);var E=w.length>0,S=function(e,n){return e.length>0?e.map(function(e){return e.includes("*")?e:e+"/**/*.{ts,tsx}"}):n.map(function(e){return e.includes("*")?e:e+"/**/*.{js,d.ts}"})}(w,k);return Promise.resolve(o.globby(S,{cwd:t,onlyFiles:!0,absolute:!0})).then(function(e){return Promise.resolve(function(e){try{return Promise.resolve(function(e){return o.globby(["node_modules/*/package.json","node_modules/@*/*/package.json"],{cwd:e,onlyFiles:!0,absolute:!0}).then(function(e){try{return Promise.resolve(Promise.all(e.map(function(e){try{return Promise.resolve(d(e)).then(function(r){var t=r.name,u=r.exports;if(!u)return{};var i=n.dirname(e),s=function(e){var n=Object.entries(e),r=function e(n){return"string"==typeof n?[n]:Object.values(n).map(e).flat(2)};return"string"!=typeof e&&Object.keys(e).some(function(e){return e.startsWith(".")})?n.map(function(e){return[e[0],r(e[1])]}):[[".",r(e)]]}(u);return Promise.resolve(Promise.all(s.map(function(e){var r=e[0];return Promise.all(e[1].map(function(e){try{return Promise.resolve(o.globby(e,{cwd:i,onlyFiles:!0,absolute:!1})).then(function(o){return o.map(function(o){return n.join(o).replace(M(".",e),M(t,r))})})}catch(e){return Promise.reject(e)}}))}))).then(function(e){return{name:t,files:e.flat(2)}})})}catch(e){return Promise.reject(e)}}))).then(function(e){return e.reduce(function(e,n){var r,t=n.name,o=n.files;return t&&e.names.push(t),o&&(r=e.files).push.apply(r,o),e},{names:[],files:[]})})}catch(e){return Promise.reject(e)}})}(e)).then(function(n){var r=n.files;return Promise.resolve(o.globby(["node_modules/**/*.(m|c)?js","!node_modules/.cache","!node_modules/.bin","!node_modules/**/node_modules"].concat(n.names.map(function(e){return"!node_modules/"+e})),{cwd:e,onlyFiles:!0,absolute:!0})).then(function(e){return{cjsModules:e,esmModules:r}})})}catch(e){return Promise.reject(e)}}(t)).then(function(o){var i=o.cjsModules,s=o.esmModules;j("debug:external-cjs-modules",i),j("debug:external-esm-modules",s);var c="string"==typeof y?x(e,y):e,l=[].concat(i,c),m=[].concat(i,x(e,".js"));j("debug:local-modules",c),c.forEach(function(o,i){var c=o.endsWith(".d.ts")?m:l,v=e[i],b=(0===w.length?o:v).replace(g(t),g(_)),h=a(v),x=F(h,o,c,r,v,E,s);f(b,x),0===w.length&&P&&t===_&&b!==v&&p(v),O&&function(e,r,t){if(void 0===t&&(t=!1),e!==r){var o=e+".map";if(u.existsSync(o)){var i=r+".map",s=d(o);s.file=n.basename(r),f(i,JSON.stringify(s)),t&&p(o)}}}(v,b,P&&t===_)})})})}catch(e){return Promise.reject(e)}},e.fixBlankFiles=_,e.fixContents=F,e.fixDefaultExport=O,e.fixDirnameVar=j,e.fixFilenameExtensions=x,e.fixFilenameVar=P,e.fixModuleReferences=y,e.fixSourceMapRef=w});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:path"),require("fs-extra"),require("json5"),require("globby"),require("node:fs")):"function"==typeof define&&define.amd?define(["exports","node:path","fs-extra","json5","globby","node:fs"],n):n((e||self).tscEsmFix={},e.node_path,e.fsExtra,e.json5,e.globby,e.node_fs)}(this,function(e,n,r,t,o,u){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=/*#__PURE__*/i(r),c=/*#__PURE__*/i(t);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l.apply(this,arguments)}var a=function(e){return s.default.readFileSync(e,{encoding:"utf8"})},f=function(e,n){return s.default.outputFileSync(e,n,{encoding:"utf8"})},d=function(e){return c.default.parse(a(e))},m=function(e){return e?Array.isArray(e)?e:[e]:[]},p=s.default.unlinkSync,g=function(e){return e.replace(/\\/g,"/")},v=function e(r){var t=d(r);if(t.extends){var o=e(n.resolve(n.dirname(r),t.extends));return l({},o,t,{compilerOptions:l({},o.compilerOptions,t.compilerOptions)})}return t},b={cwd:process.cwd(),tsconfig:"./tsconfig.json",filenameVar:!0,dirnameVar:!0,ext:!0,unlink:!0,debug:function(){}},h=function(e,r){return m(e).reduce(function(e,t){var o,u,i=v(n.resolve(r,t)),s=null==i||null==(o=i.compilerOptions)?void 0:o.outDir,c=null==i||null==(u=i.compilerOptions)||null==u.module.toLowerCase?void 0:u.module.toLowerCase();return s&&c.startsWith("es")?e.push(s):console.warn("tsconfig should declare `outDir` and `module` type es6 or above"),e},[])},x=function(e,n){return e.map(function(e){return e.endsWith(".d.ts")?e:e.replace(/\.[^./\\]+$/,n)})},y=function(e,r,t,o,u){return e.replace(/(\sfrom\s|[\s(:[](?:import|require)[ (])(["'])([^"']+\/[^"']+|\.{1,2})\/?(["'])/g,function(e,i,s,c,l){return""+i+s+(u.includes(c)?c:function(e,r,t,o){var u=n.dirname(e),i=n.resolve(o,"node_modules"),s=/^\..+\.[^./\\]+$/.test(r)?[r,r.replace(/\.[^./\\]+$/,"")]:[r],c=[".js",".cjs",".mjs"].reduce(function(e,n){return s.forEach(function(r){return e.push(""+r+n,r+"/index"+n)}),e},[]);return c.find(function(e){return t.includes(g(n.resolve(u,e)))})||c.find(function(e){return t.includes(g(n.resolve(i,e)))})||r}(r,c,t,o))+l})},j=function(e,n){return e.replace(/__dirname/g,"`${process.platform === 'win32' ? '' : '/'}${/file:\\/{2,3}(.+)\\/[^/]/.exec(import.meta.url)"+(n?"!":"")+"[1]}`")},P=function(e,n){return e.replace(/__filename/g,"`${process.platform === 'win32' ? '' : '/'}${/file:\\/{2,3}(.+)/.exec(import.meta.url)"+(n?"!":"")+"[1]}`")},O=function(e){return e.includes("export default")?e:e+"\nexport default undefined\n"},_=function(e){return 0===e.trim().length?"\nexport {}\nexport default undefined\n":e},w=function(e,r,t){return r===t?e:e.replace("//# sourceMappingURL="+n.basename(r)+".map","//# sourceMappingURL="+n.basename(t)+".map")},F=function(e,n,r,t,o,u,i){var s=t.dirnameVar,c=t.filenameVar,l=t.fillBlank,a=t.forceDefaultExport,f=t.sourceMap;void 0===o&&(o=n),void 0===u&&(u=!1),void 0===i&&(i=[]);var d=e;return t.ext&&(d=y(d,n,r,t.cwd,i)),s&&(d=j(d,u)),c&&(d=P(d,u)),l&&(d=_(d)),a&&(d=O(d)),f&&(d=w(d,o,n)),d},M=function(e,r){if(!r)return e;var t=r;return t.includes("*")&&(t=t.slice(0,t.indexOf("*"))).includes("/")&&(t=t.slice(0,t.lastIndexOf("/"))),n.join(e,t)};e.DEFAULT_FIX_OPTIONS=b,e.fix=function(e){try{var r=function(e){return l({},b,e,{debug:"function"==typeof(null==e?void 0:e.debug)?e.debug:!0===(null==e?void 0:e.debug)?console.log:b.debug})}(e),t=r.cwd,i=r.target,s=r.src,c=r.tsconfig,v=r.out,y=r.ext,j=r.debug,P=r.unlink,O=r.sourceMap,_=n.resolve(t,void 0===v?t:v),w=m(s),k=[].concat(m(i),h(c,t));j("debug:cwd",t),j("debug:outdir",_),j("debug:sources",w),j("debug:targets",k);var E=w.length>0,S=function(e,n){return e.length>0?e.map(function(e){return e.includes("*")?e:e+"/**/*.{ts,tsx}"}):n.map(function(e){return e.includes("*")?e:e+"/**/*.{js,d.ts}"})}(w,k);return Promise.resolve(o.globby(S,{cwd:t,onlyFiles:!0,absolute:!0})).then(function(e){return Promise.resolve(function(e){try{return Promise.resolve(function(e){return o.globby(["node_modules/*/package.json","node_modules/@*/*/package.json"],{cwd:e,onlyFiles:!0,absolute:!0}).then(function(e){try{return Promise.resolve(Promise.all(e.map(function(e){try{return Promise.resolve(d(e)).then(function(r){var t=r.name,u=r.exports;if(!u)return{};var i=n.dirname(e),s=function(e){var n=Object.entries(e),r=function e(n){return"string"==typeof n?[n]:Object.values(n).map(e).flat(2)};return"string"!=typeof e&&Object.keys(e).some(function(e){return e.startsWith(".")})?n.map(function(e){return[e[0],r(e[1])]}):[[".",r(e)]]}(u);return Promise.resolve(Promise.all(s.map(function(e){var r=e[0];return Promise.all(e[1].map(function(e){try{return Promise.resolve(o.globby(e,{cwd:i,onlyFiles:!0,absolute:!1})).then(function(o){return o.map(function(o){return n.join(o).replace(M(".",e),M(t,r))})})}catch(e){return Promise.reject(e)}}))}))).then(function(e){return{name:t,files:e.flat(2)}})})}catch(e){return Promise.reject(e)}}))).then(function(e){return e.reduce(function(e,n){var r,t=n.name,o=n.files;return t&&e.names.push(t),o&&(r=e.files).push.apply(r,o),e},{names:[],files:[]})})}catch(e){return Promise.reject(e)}})}(e)).then(function(n){var r=n.files;return Promise.resolve(o.globby(["!node_modules/.cache","!node_modules/.bin","!node_modules/**/node_modules"].concat(n.names.map(function(e){return"!node_modules/"+e}),["node_modules/**/*.(m|c)?js"]),{cwd:e,onlyFiles:!0,absolute:!0})).then(function(e){return{cjsModules:e,esmModules:r}})})}catch(e){return Promise.reject(e)}}(t)).then(function(o){var i=o.cjsModules,s=o.esmModules;j("debug:external-cjs-modules",i),j("debug:external-esm-modules",s);var c="string"==typeof y?x(e,y):e,l=[].concat(i,c),m=[].concat(i,x(e,".js"));j("debug:local-modules",c),c.forEach(function(o,i){var c=o.endsWith(".d.ts")?m:l,v=e[i],b=(0===w.length?o:v).replace(g(t),g(_)),h=a(v),x=F(h,o,c,r,v,E,s);f(b,x),0===w.length&&P&&t===_&&b!==v&&p(v),O&&function(e,r,t){if(void 0===t&&(t=!1),e!==r){var o=e+".map";if(u.existsSync(o)){var i=r+".map",s=d(o);s.file=n.basename(r),f(i,JSON.stringify(s)),t&&p(o)}}}(v,b,P&&t===_)})})})}catch(e){return Promise.reject(e)}},e.fixBlankFiles=_,e.fixContents=F,e.fixDefaultExport=O,e.fixDirnameVar=j,e.fixFilenameExtensions=x,e.fixFilenameVar=P,e.fixModuleReferences=y,e.fixSourceMapRef=w});
//# sourceMappingURL=tsc-esm-fix.umd.js.map

@@ -255,3 +255,2 @@ import {basename, dirname, join,resolve} from 'node:path'

[
'node_modules/**/*.(m|c)?js',
'!node_modules/.cache',

@@ -261,2 +260,3 @@ '!node_modules/.bin',

...names.map(m => `!node_modules/${m}`),
'node_modules/**/*.(m|c)?js',
],

@@ -263,0 +263,0 @@ {

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

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