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

babel-plugin-transform-invariant-location

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-invariant-location - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.node-version

13

index.js

@@ -14,3 +14,14 @@ const visited = new WeakSet()

const location = `${this.getModuleName()}.js:${path.node.loc.start.line}`
let moduleName = this.getModuleName()
if (moduleName) {
moduleName = t.stringLiteral(moduleName) + '.js'
} else {
try {
moduleName = this.file.opts.filename.replace(`${this.cwd}/`, '')
} catch (err) {
return
}
}
const location = `${moduleName}:${path.node.loc.start.line}`
const message = path.node.arguments.length === 2 ?

@@ -17,0 +28,0 @@ `${path.node.arguments[1].value} -- ${location}` :

2

package.json
{
"name": "babel-plugin-transform-invariant-location",
"version": "1.0.0",
"version": "1.0.1",
"description": "Babel plugin that rewrites invariant calls with their source location",

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

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