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

sfdx-git-delta

Package Overview
Dependencies
Maintainers
1
Versions
428
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sfdx-git-delta - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

__mocks__/fs.js

@@ -37,2 +37,4 @@ 'use strict'

fs.readFileSync = () => '<type>MasterDetail</type>'
fs.writeFile = (_filePath, _content, _encoding, cb) =>

@@ -39,0 +41,0 @@ errorMode ? cb(new Error()) : cb(null)

39

lib/service/subCustomObjectHandler.js

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

const fse = require('fs-extra')
const fs = require('fs')
const OBJECT_META_XML_SUFFIX = `object${StandardHandler.METAFILE_SUFFIX}`
class SubCustomObjectHandler extends StandardHandler {

@@ -22,22 +21,30 @@ handleDeletion() {

const customObjectPath = this.splittedLine
.slice(0, [this.splittedLine.indexOf(this.type)])
.join(path.sep)
const customObject = this.splittedLine[
this.splittedLine.indexOf(this.type) - 1
]
const fieldContent = fs.readFileSync(path.join(this.config.repo, this.line))
if (
!!fieldContent &&
fieldContent.includes(SubCustomObjectHandler.MASTER_DETAIL_TAG)
) {
const customObjectPath = this.splittedLine
.slice(0, [this.splittedLine.indexOf(this.type)])
.join(path.sep)
const customObject = this.splittedLine[
this.splittedLine.indexOf(this.type) - 1
]
const commonPath = `${customObjectPath +
path.sep +
customObject}.${OBJECT_META_XML_SUFFIX}`
const commonPath = `${customObjectPath + path.sep + customObject}.${
SubCustomObjectHandler.OBJECT_META_XML_SUFFIX
}`
this.promises.push(
fse.copy(
path.join(this.config.repo, commonPath),
path.join(this.config.output, commonPath)
this.promises.push(
fse.copy(
path.join(this.config.repo, commonPath),
path.join(this.config.output, commonPath)
)
)
)
}
}
}
SubCustomObjectHandler.MASTER_DETAIL_TAG = '<type>MasterDetail</type>'
SubCustomObjectHandler.OBJECT_META_XML_SUFFIX = `object${StandardHandler.METAFILE_SUFFIX}`
module.exports = SubCustomObjectHandler
{
"name": "sfdx-git-delta",
"version": "2.0.3",
"version": "2.0.4",
"description": "Generate the sfdx content in source format and destructive change from two git commits",

@@ -25,3 +25,3 @@ "keyword": [

"pre-commit": "lint-staged",
"pre-push": "npm run test"
"pre-push": "npm run test:coverage"
}

@@ -28,0 +28,0 @@ },

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