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

babel-transform-roll20

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-transform-roll20 - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

2

package.json
{
"name": "babel-transform-roll20",
"version": "0.5.0",
"version": "0.6.0",
"description": "A babel transform tool for transpiling scripts for the Roll20 sandbox.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,3 +9,5 @@ const babelParser = require('@babel/parser')

module.exports = function roll20Transform ({ types: t }) {
function getFileContents (filePath, roots) {
function getFileContents (file, roots) {
const filePath = `${file.dir}/${file.base}${file.ext && file.base.endsWith(file.ext) ? '' : '.js'}`
try {

@@ -43,3 +45,3 @@ const file = fs.readFileSync(filePath, {

if (!program.__visited_files[filePath]) {
let fileContents = getFileContents(`${file.dir}/${file.base}${file.ext && file.base.endsWith(file.ext) ? '' : '.js'}`, program.__roots)
let fileContents = getFileContents(file, program.__roots)

@@ -155,3 +157,3 @@ switch (file.ext) {

const moduleName = getModule(path)
const exportName = `__export__${moduleName.slice(1, -1).replace(/[/-.]/g, '_')}`
const exportName = `__export__${moduleName.slice(1, -1).replace(/[./-]/g, '_')}`

@@ -158,0 +160,0 @@ exportBlock.__exports[exportName] = true

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