New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@begin/enhance

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@begin/enhance - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

18

lib/fingerprinted-file-path.js

@@ -10,19 +10,19 @@ let manifest

module.exports = function fingerprintedFilePath(asset) {
const key = asset[0] === '/'
? asset.substring(1)
: asset
const isIndex = asset === '/'
module.exports = function fingerprintedFilePath(rootRelativeAssetPath) {
const asset = rootRelativeAssetPath[0] === '/'
? rootRelativeAssetPath.substring(1)
: rootRelativeAssetPath
const local = process.env.ARC_ENV
? process.env.ARC_ENV === 'testing'
: process.env.NODE_ENV === 'testing'
if (manifest && !local && !isIndex) {
const fingerprintedFileName = manifest[key]
if (manifest && !local) {
const fingerprintedFileName = manifest[asset]
if (!fingerprintedFileName) {
throw ReferenceError(`${key} not found in the fingerprint manifest: static.json`)
// You could have a custom element you want to render with enhance without a backing web component
console.warn(`${asset} not found in the fingerprint manifest: static.json`)
}
return `/${STATIC_ROOT}/${fingerprintedFileName}`
}
return `/${STATIC_ROOT}/${ isIndex ? '' : key }`
return `/${STATIC_ROOT}/${asset}`
}
{
"name": "@begin/enhance",
"version": "1.1.2",
"version": "1.1.3",
"description": "Server-side rendering for custom elements with template and slots support",

@@ -5,0 +5,0 @@ "scripts": {

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