Socket
Socket
Sign inDemoInstall

@backpackjs/transform-product-feed

Package Overview
Dependencies
Maintainers
7
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backpackjs/transform-product-feed - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1-canary.47.2552574952.0

14

dist/index.js

@@ -12,8 +12,8 @@ "use strict";

return feed.toRSS({
title: '',
description: '',
title: "",
description: "",
link: process.env.SITE_URL,
}, { pretty: false });
};
const filterDraft = (product) => product.status.toLowerCase() !== 'draft';
const filterDraft = (product) => product.status.toLowerCase() !== "draft";
const getProduct = (products) => (handle) => {

@@ -39,4 +39,4 @@ return products.find((product) => product.handle === handle);

brand: product.vendor,
condition: 'new',
availability: variant.availableForSale ? 'in stock' : 'out of stock',
condition: "new",
availability: variant.availableForSale ? "in stock" : "out of stock",
inventory: String(variant.inventoryQuantity),

@@ -61,7 +61,7 @@ shipping_weight: `${variant.weight} ${variant.weightUnit}`,

.flatMap(getFeedItems);
await fs_extra_1.default.outputFile(path_1.default.resolve(input.context.target, 'public/product-feed.xml'), buildXML(feedItems));
await fs_extra_1.default.outputFile(path_1.default.resolve(input.context.target, "public/product-feed.xml"), buildXML(feedItems));
return input;
}
catch (error) {
input._task.title = `❌ error in Product Feed Transform: ${error.message}`;
input.task.title = `❌ error in Product Feed Transform: ${error.message}`;
return input;

@@ -68,0 +68,0 @@ // throw error;

{
"name": "@backpackjs/transform-product-feed",
"version": "4.2.0",
"version": "4.2.1-canary.47.2552574952.0",
"license": "MIT",

@@ -22,3 +22,3 @@ "author": "BackpackJS <dev@packdigial.com> (http://packdigital.com/)",

},
"gitHead": "ff414f68854e024e4344a7ff8b16619afd4ce474"
"gitHead": "4ee331912d8ddeca478c2aeaa12f69aaaa8c5d27"
}
/* eslint-disable camelcase */
import path from 'path';
import fs from 'fs-extra';
import fbcatalog from 'fbcatalog';
import path from "path";
import fs from "fs-extra";
import fbcatalog from "fbcatalog";

@@ -13,4 +13,4 @@ const buildXML = (feedItems) => {

{
title: '',
description: '',
title: "",
description: "",
link: process.env.SITE_URL,

@@ -22,3 +22,3 @@ },

const filterDraft = (product) => product.status.toLowerCase() !== 'draft';
const filterDraft = (product) => product.status.toLowerCase() !== "draft";

@@ -48,4 +48,4 @@ const getProduct = (products) => (handle) => {

brand: product.vendor,
condition: 'new',
availability: variant.availableForSale ? 'in stock' : 'out of stock',
condition: "new",
availability: variant.availableForSale ? "in stock" : "out of stock",
inventory: String(variant.inventoryQuantity),

@@ -74,3 +74,3 @@ shipping_weight: `${variant.weight} ${variant.weightUnit}`,

await fs.outputFile(
path.resolve(input.context.target, 'public/product-feed.xml'),
path.resolve(input.context.target, "public/product-feed.xml"),
buildXML(feedItems)

@@ -81,3 +81,3 @@ );

} catch (error) {
input._task.title = `❌ error in Product Feed Transform: ${error.message}`;
input.task.title = `❌ error in Product Feed Transform: ${error.message}`;
return input;

@@ -84,0 +84,0 @@ // throw error;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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