"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/rollup-plugin-babel-source.js" between
babel-7.12.6.tar.gz and babel-7.12.7.tar.gz

About: Babel is a JavaScript compiler that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript. Hint: There exists a high-performance language interoperability tool also named "Babel".

rollup-plugin-babel-source.js  (babel-7.12.6):rollup-plugin-babel-source.js  (babel-7.12.7)
skipping to change at line 84 skipping to change at line 84
return null; return null;
} }
const packageJson = JSON.parse(packageJsonSource); const packageJson = JSON.parse(packageJsonSource);
const filename = const filename =
typeof packageJson["browser"] === "string" typeof packageJson["browser"] === "string"
? packageJson["browser"] ? packageJson["browser"]
: packageJson["main"]; : packageJson["main"];
return path.normalize( const asJS = path.normalize(
path.join( path.join(
packageFolder, packageFolder,
// replace lib with src in the package.json entry // replace lib with src in the package.json entry
filename.replace(/^(\.\/)?lib\//, "src/") filename.replace(/^(\.\/)?lib\//, "src/")
) )
); );
const asTS = asJS.replace(/\.js$/, ".ts");
try {
fs.statSync(asTS);
return asTS;
} catch {
return asJS;
}
}, },
}; };
}; };
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)