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

@hashicorp/hashi-basic-list

Package Overview
Dependencies
Maintainers
8
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/hashi-basic-list - npm Package Compare versions

Comparing version 0.0.10 to 1.0.0

35

dist/index.js

@@ -14,13 +14,19 @@ 'use strict';

_ref$date_icon = _ref.date_icon,
date_icon = _ref$date_icon === undefined ? 'true' : _ref$date_icon;
date_icon = _ref$date_icon === undefined ? 'true' : _ref$date_icon,
expire_old = _ref.expire_old;
var data = reshapePreactComponents.decode(_data);
var today = new Date();
var dateIcon = date_icon === 'true' || date_icon === true;
return preact.h(
'ul',
{ 'class': 'g-basic-list' },
data.map(function (d) {
return preact.h(
data.reduce(function (acc, d) {
var date = d.date ? new Date(d.date) : null;
var renderTopSection = dateIcon && d.location || !dateIcon && date || d.detail;
if (expire_old && date && today.getTime() > date.getTime()) return acc;
acc.push(preact.h(
'li',
{ 'data-id': d.id ? d.id : '' },
date_icon === 'true' && d.date && preact.h(
date && dateIcon && preact.h(
'div',

@@ -31,3 +37,3 @@ { 'class': 'date' },

null,
strftime('%d', new Date(d.date))
strftime('%d', date)
),

@@ -37,3 +43,3 @@ preact.h(

null,
strftime('%b', new Date(d.date))
strftime('%b', date)
)

@@ -47,15 +53,15 @@ ),

{ 'class': 'content' },
preact.h(
renderTopSection && preact.h(
'div',
{ 'class': 'top' },
date_icon === 'true' && d.location && preact.h(
!dateIcon && date && preact.h(
'span',
null,
preact.h('i', { 'class': 'pin' }),
d.location
strftime('%d %b %Y', date)
),
date_icon === 'false' && d.date && preact.h(
d.location && preact.h(
'span',
null,
strftime('%d %b %Y', new Date(d.date))
preact.h('i', { 'class': 'pin' }),
d.location
),

@@ -75,4 +81,5 @@ d.detail && preact.h(

)
);
})
));
return acc;
}, [])
);

@@ -79,0 +86,0 @@ }

10

package.json
{
"name": "@hashicorp/hashi-basic-list",
"description": "simple vertical list with optional date and location render",
"version": "0.0.10",
"version": "1.0.0",
"main": "dist",
"peerDependencies": {
"@hashicorp/hashi-global-styles": "^0.1.2",
"preact": "^8.2.6",
"reshape-preact-components": "^0.6.0",
"strftime": "^0.10.0"
"@hashicorp/hashi-global-styles": "^1.0.0",
"preact": "^8.2.7",
"reshape-preact-components": "~0.6.0",
"strftime": "~0.10.0"
},

@@ -12,0 +12,0 @@ "publishConfig": {

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