Socket
Socket
Sign inDemoInstall

fastify-plugin

Package Overview
Dependencies
1
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

test/composite.test.ts

7

index.js

@@ -7,4 +7,4 @@ 'use strict'

const DISPLAY_NAME_SYMBOL = Symbol.for('fastify.display-name')
const fpStackTracePattern = new RegExp('at\\s{1}plugin\\s{1}.*\\n\\s*(.*)')
const fileNamePattern = new RegExp('(?:\\/|\\\\)(\\w*(\\.\\w*)*)\\.js')
const fpStackTracePattern = new RegExp('at\\s{1}(?:.*\\.)?plugin\\s{1}.*\\n\\s*(.*)')
const fileNamePattern = new RegExp('(?:\\/|\\\\)(\\w*(\\.\\w*)*)\\..*')

@@ -49,4 +49,3 @@ function plugin (fn, options) {

let m = stack.match(fpStackTracePattern)
m = m[1].match(fileNamePattern)[1]
return m
return m ? m[1].match(fileNamePattern)[1] : 'anonymous'
}

@@ -53,0 +52,0 @@ }

{
"name": "fastify-plugin",
"version": "1.1.2",
"version": "1.1.3",
"description": "Plugin helper for Fastify",

@@ -9,3 +9,3 @@ "main": "index.js",

"typescript": "tsc --project ./tsconfig.json",
"test": "standard && tap test/* && npm run typescript"
"test": "standard && tap test/*.js && npm run typescript"
},

@@ -33,2 +33,3 @@ "repository": {

"tap": "^12.0.0",
"ts-node": "^6.1.1",
"typescript": "^2.9.1"

@@ -35,0 +36,0 @@ },

@@ -7,2 +7,3 @@ {

"strict": true,
"noImplicitAny": false,
},

@@ -9,0 +10,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc