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

reshow-runtime

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshow-runtime - npm Package Compare versions

Comparing version 0.17.5 to 0.17.6

es/helpers/__tests__/resolveExtTest.mjs

26

helpers/resolveExt.js

@@ -6,8 +6,8 @@ "use strict";

var _default = function _default(filepath, extMap) {
if (0 !== filepath.indexOf(".")) {
return filepath; // not local import
var _default = function _default(filePath, extMap) {
if (0 !== filePath.indexOf(".")) {
return filePath; // not local import
}
var baseName = filepath.split("/").splice(-1)[0];
var baseName = filePath.split("/").splice(-1)[0];
var extDotPos = baseName.lastIndexOf(".");

@@ -19,14 +19,16 @@ var extNone = extMap[""];

// No extension
return extNone ? filepath + extNone : filepath;
return extNone ? filePath + extNone : filePath;
}
var extPos = extDotPos + 1;
var extKeys = Object.keys(extMap);
var nextPath = filePath;
var isFind;
var i = extKeys.length;
while (i--) {
var origExt = extKeys[i];
var fromExt = extKeys[i];
if (extPos === baseName.lastIndexOf(origExt)) {
filepath = filepath.slice(0, -origExt.length) + extMap[origExt];
if (extDotPos === baseName.lastIndexOf(fromExt)) {
nextPath = filePath.slice(0, -fromExt.length) + extMap[fromExt];
isFind = true;
break;

@@ -36,3 +38,7 @@ }

return filepath;
if (extNone && nextPath === filePath && isFind) {
nextPath = filePath + extNone;
}
return nextPath;
};

@@ -39,0 +45,0 @@

{
"name": "reshow-runtime",
"version": "0.17.5",
"version": "0.17.6",
"description": "Babel runtime alternative",

@@ -5,0 +5,0 @@ "repository": "react-atomic/reshow",

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