From 9a6fce777445e4859caf11e04b4ab8e2fbe3b7cc Mon Sep 17 00:00:00 2001 From: Charlie Jonas Date: Wed, 30 Oct 2019 22:04:14 -0600 Subject: [PATCH 1/3] #21 fixing NPE when deleted file does not have a resolver --- src/commands/git/package.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/git/package.ts b/src/commands/git/package.ts index 6a453da..de46815 100644 --- a/src/commands/git/package.ts +++ b/src/commands/git/package.ts @@ -188,7 +188,6 @@ export default class Package extends SfdxCommand { } for (let mdPath of metadataPaths) { - if (isAbsolute(mdPath)) { mdPath = relative(this.projectPath, mdPath); } @@ -258,7 +257,9 @@ export default class Package extends SfdxCommand { const notFullyRemoved = []; for (const path of removed) { const resolver = getResolver(path); - + if (!resolver) { + continue; + } if (resolver.getIsDirectory()) { const metadataPaths = await resolver.getMetadataPaths(path, targetRef); // current implementation will return meta file regardless of whether it exists in org or not From ac60be13a7b4126ffc688c286e4be3f8f0590db0 Mon Sep 17 00:00:00 2001 From: Charlie Jonas Date: Wed, 30 Oct 2019 22:05:29 -0600 Subject: [PATCH 2/3] v-bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be4e48e..0372002 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sfdx-git-packager", "description": "Generates a package.xml for difference between two branches", - "version": "0.0.3", + "version": "0.0.4", "author": "Charlie Jonas @ChuckJonas", "bugs": "https://github.com/ChuckJonas/sfdx-git-diff-to-pkg/issues", "dependencies": { From c3390fd1baae29cc26409c4c929a21858bc96d3c Mon Sep 17 00:00:00 2001 From: Charlie Jonas Date: Wed, 30 Oct 2019 22:05:55 -0600 Subject: [PATCH 3/3] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1db3cf7..3d394c3 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ EXAMPLES $ sfdx git:package -s head -d deployments/my-working-copy ``` -_See code: [lib/commands/git/package.js](https://github.com/ChuckJonas/sfdx-git-diff-to-pkg/blob/v0.0.3/lib/commands/git/package.js)_ +_See code: [lib/commands/git/package.js](https://github.com/ChuckJonas/sfdx-git-diff-to-pkg/blob/v0.0.4/lib/commands/git/package.js)_ ### Ignore Files