sfdx-git-delta
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -8,2 +8,3 @@ 'use strict' | ||
(type, changePath, expected) => { | ||
beforeEach(() => (testContext.work.diffs = {})) | ||
test('addition', () => { | ||
@@ -10,0 +11,0 @@ const handler = new testContext.handler( |
@@ -14,2 +14,12 @@ 'use strict' | ||
], | ||
[ | ||
'staticresources', | ||
'force-app/main/default/staticresources/resource.js', | ||
new Set(['resource']), | ||
], | ||
[ | ||
'staticresources', | ||
'force-app/main/default/staticresources/erase.resource-meta.xml', | ||
new Set(['erase']), | ||
], | ||
], | ||
@@ -28,2 +38,4 @@ work: { | ||
'force-app/main/default/staticresources/test/content': 'test', | ||
'force-app/main/default/staticresources/resource.resource-meta.xml': | ||
'resource', | ||
}) | ||
@@ -30,0 +42,0 @@ }) |
@@ -18,2 +18,4 @@ 'use strict' | ||
const parsedResourceName = path.parse(resourceName) | ||
if (!Object.prototype.hasOwnProperty.call(staticResourcesSrc, srcPath)) { | ||
@@ -23,3 +25,3 @@ staticResourcesSrc[srcPath] = fs.readdirSync(srcPath) | ||
staticResourcesSrc[srcPath] | ||
.filter(src => src.indexOf(resourceName) !== -1) | ||
.filter(src => src.indexOf(parsedResourceName.name) !== -1) | ||
.forEach(src => | ||
@@ -26,0 +28,0 @@ this.promises.push( |
@@ -69,5 +69,9 @@ 'use strict' | ||
_getElementName() { | ||
return this.splittedLine[this.splittedLine.indexOf(this.type) + 1] | ||
.replace(StandardHandler.METAFILE_SUFFIX, '') | ||
.replace(`.${this.metadata[this.type].suffix}`, '') | ||
const parsedPath = path.parse( | ||
this.splittedLine[this.splittedLine.indexOf(this.type) + 1] | ||
.replace(StandardHandler.METAFILE_SUFFIX, '') | ||
.replace(`.${this.metadata[this.type].suffix}`, '') | ||
) | ||
return parsedPath.dir + parsedPath.name | ||
} | ||
@@ -74,0 +78,0 @@ } |
{ | ||
"name": "sfdx-git-delta", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Generate the sfdx content in source format and destructive change from two git commits", | ||
@@ -5,0 +5,0 @@ "keyword": [ |
12833265
2056