Skip to content

Commit e39bbc4

Browse files
authored
Merge pull request #4449 from NativeScript/kddimitrov/update-xcode-dependencies
chore: update xcode dependencies
2 parents 0e382db + 2d40479 commit e39bbc4

File tree

5 files changed

+85
-70
lines changed

5 files changed

+85
-70
lines changed

lib/definitions/xcode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module "xcode" {
1+
declare module "nativescript-dev-xcode" {
22
interface Options {
33
[key: string]: any;
44

lib/node/xcode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as xcode from "xcode";
1+
import * as xcode from "nativescript-dev-xcode";
22

33
declare global {
44
type IXcode = typeof xcode;

npm-shrinkwrap.json

Lines changed: 70 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,15 @@
5656
"minimatch": "3.0.2",
5757
"mkdirp": "0.5.1",
5858
"mute-stream": "0.0.5",
59+
"nativescript-dev-xcode": "https://github.com/NativeScript/nativescript-dev-xcode/archive/master.tar.gz",
5960
"nativescript-doctor": "1.8.1",
6061
"nativescript-preview-sdk": "0.3.3",
6162
"open": "0.0.5",
6263
"ora": "2.0.0",
6364
"osenv": "0.1.3",
6465
"pacote": "8.1.6",
6566
"pako": "1.0.6",
66-
"pbxproj-dom": "1.0.11",
67+
"pbxproj-dom": "1.1.0",
6768
"plist": "1.1.0",
6869
"plist-merge-patch": "0.1.1",
6970
"proper-lockfile": "3.2.0",
@@ -83,7 +84,6 @@
8384
"uuid": "3.0.1",
8485
"winreg": "0.0.17",
8586
"ws": "5.1.0",
86-
"xcode": "https://github.com/NativeScript/node-xcode/archive/kddimitrov/rebase-upstream.tar.gz",
8787
"xml2js": "0.4.19",
8888
"xmldom": "0.1.21",
8989
"yargs": "6.0.0",
@@ -133,4 +133,4 @@
133133
"engines": {
134134
"node": ">=8.0.0 <12.0.0"
135135
}
136-
}
136+
}

test/ios-project-service.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ describe("Source code support", () => {
697697
return pbxProj;
698698
};
699699

700-
it("adds source files as resources", async () => {
700+
it("adds source files in Sources build phase", async () => {
701701
const sourceFileNames = [
702702
"src/Header.h", "src/ObjC.m",
703703
"src/nested/Header.hpp", "src/nested/Source.cpp", "src/nested/ObjCpp.mm",
@@ -721,14 +721,15 @@ describe("Source code support", () => {
721721

722722
sourceFileNames.map(file => path.basename(file)).forEach(basename => {
723723
const ext = path.extname(basename);
724-
const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h");
724+
const shouldBeAdded = ext !== ".donotadd";
725725
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
726+
726727
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
727-
if (shouldBeAdded) {
728+
if (shouldBeAdded && !path.extname(basename).startsWith(".h")) {
728729
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
729730
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
730731
} else {
731-
assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`);
732+
assert.isUndefined(buildPhaseFile, `${basename} is added to PBXSourcesBuildPhase, but it shouldn't have been.`);
732733
}
733734
});
734735
});
@@ -749,14 +750,15 @@ describe("Source code support", () => {
749750

750751
sourceFileNames.map(file => path.basename(file)).forEach(basename => {
751752
const ext = path.extname(basename);
752-
const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h");
753-
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
753+
const shouldBeAdded = ext !== ".donotadd";
754754
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
755-
if (shouldBeAdded) {
755+
756+
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
757+
if (shouldBeAdded && !path.extname(basename).startsWith(".h")) {
756758
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
757759
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
758760
} else {
759-
assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`);
761+
assert.isUndefined(buildPhaseFile, `${basename} was added to PBXSourcesBuildPhase, but it shouldn't have been`);
760762
}
761763
});
762764
});

0 commit comments

Comments
 (0)