From 2d40479ef8bdcbbd6030995e3db21c4cc88c2311 Mon Sep 17 00:00:00 2001 From: "Kristian D. Dimitrov" Date: Tue, 19 Mar 2019 18:23:30 +0200 Subject: [PATCH] chore: update xcode dependencies --- lib/definitions/xcode.d.ts | 2 +- lib/node/xcode.ts | 2 +- npm-shrinkwrap.json | 127 ++++++++++++++++++++---------------- package.json | 6 +- test/ios-project-service.ts | 18 ++--- 5 files changed, 85 insertions(+), 70 deletions(-) diff --git a/lib/definitions/xcode.d.ts b/lib/definitions/xcode.d.ts index 9f1d2380a9..6b28c4382e 100644 --- a/lib/definitions/xcode.d.ts +++ b/lib/definitions/xcode.d.ts @@ -1,4 +1,4 @@ -declare module "xcode" { +declare module "nativescript-dev-xcode" { interface Options { [key: string]: any; diff --git a/lib/node/xcode.ts b/lib/node/xcode.ts index c391e2f242..e1595f9e23 100644 --- a/lib/node/xcode.ts +++ b/lib/node/xcode.ts @@ -1,4 +1,4 @@ -import * as xcode from "xcode"; +import * as xcode from "nativescript-dev-xcode"; declare global { type IXcode = typeof xcode; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 5f783ca158..5dca22d2a5 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -5204,6 +5204,19 @@ "supports-color": "^5.3.0" } }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "requires": { + "colors": "1.0.3" + } + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -5537,6 +5550,59 @@ "to-regex": "^3.0.1" } }, + "nativescript-dev-xcode": { + "version": "https://github.com/NativeScript/nativescript-dev-xcode/archive/master.tar.gz", + "integrity": "sha512-eiN7ntoIdoiDwNly9Oo4q+mkINQJL25wnjmDdb6Q2DWh81l6cPkRTcpNGsJ8xUjqg+AQ43IB1WxJEV0Zu1PJCw==", + "requires": { + "simple-plist": "^1.0.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + }, + "bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "requires": { + "big-integer": "^1.6.7" + } + }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" + } + }, + "simple-plist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.0.0.tgz", + "integrity": "sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g==", + "requires": { + "bplist-creator": "0.0.7", + "bplist-parser": "0.1.1", + "plist": "^3.0.1" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } + } + }, "nativescript-doctor": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-1.8.1.tgz", @@ -6240,9 +6306,9 @@ "dev": true }, "pbxproj-dom": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pbxproj-dom/-/pbxproj-dom-1.0.11.tgz", - "integrity": "sha1-MTbG1tphwkOW8Byvr5xBJGaPTAU=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pbxproj-dom/-/pbxproj-dom-1.1.0.tgz", + "integrity": "sha512-ti2ZuXEptfYbkkUweP6sBtLBlRjTcWkxWG450lbJ+PwNMk8nvhhAtV7lIuQPHR29h7hPUHOIvUBAIljIx8ygxg==" }, "pend": { "version": "1.2.0", @@ -8273,59 +8339,6 @@ "async-limiter": "~1.0.0" } }, - "xcode": { - "version": "https://github.com/NativeScript/node-xcode/archive/kddimitrov/rebase-upstream.tar.gz", - "integrity": "sha512-Q3YJ5wG/EaEMpO48dFAZ496TUkgpNhOXvXoFIMDPLkAowKKL6kcnx9f2kBxuhvqBFcHwNBfQT5FBol2pV7n96A==", - "requires": { - "simple-plist": "^1.0.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" - }, - "bplist-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "requires": { - "big-integer": "^1.6.7" - } - }, - "plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", - "requires": { - "base64-js": "^1.2.3", - "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" - } - }, - "simple-plist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.0.0.tgz", - "integrity": "sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g==", - "requires": { - "bplist-creator": "0.0.7", - "bplist-parser": "0.1.1", - "plist": "^3.0.1" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - } - } - }, "xhr": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", @@ -8450,4 +8463,4 @@ "integrity": "sha512-99p+ohUBZ2Es0AXrw/tpazMcJ0/acpdQXr0UPrVWF0p7i8XiOYvjiXTdwXUVCTPopBGCSDtWBzOoYNPtF3z/8w==" } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 5985f14366..e0d24c8076 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "minimatch": "3.0.2", "mkdirp": "0.5.1", "mute-stream": "0.0.5", + "nativescript-dev-xcode": "https://github.com/NativeScript/nativescript-dev-xcode/archive/master.tar.gz", "nativescript-doctor": "1.8.1", "nativescript-preview-sdk": "0.3.3", "open": "0.0.5", @@ -63,7 +64,7 @@ "osenv": "0.1.3", "pacote": "8.1.6", "pako": "1.0.6", - "pbxproj-dom": "1.0.11", + "pbxproj-dom": "1.1.0", "plist": "1.1.0", "plist-merge-patch": "0.1.1", "proper-lockfile": "3.2.0", @@ -83,7 +84,6 @@ "uuid": "3.0.1", "winreg": "0.0.17", "ws": "5.1.0", - "xcode": "https://github.com/NativeScript/node-xcode/archive/kddimitrov/rebase-upstream.tar.gz", "xml2js": "0.4.19", "xmldom": "0.1.21", "yargs": "6.0.0", @@ -133,4 +133,4 @@ "engines": { "node": ">=8.0.0 <12.0.0" } -} \ No newline at end of file +} diff --git a/test/ios-project-service.ts b/test/ios-project-service.ts index fa21cb2880..043bbcd8fc 100644 --- a/test/ios-project-service.ts +++ b/test/ios-project-service.ts @@ -697,7 +697,7 @@ describe("Source code support", () => { return pbxProj; }; - it("adds source files as resources", async () => { + it("adds source files in Sources build phase", async () => { const sourceFileNames = [ "src/Header.h", "src/ObjC.m", "src/nested/Header.hpp", "src/nested/Source.cpp", "src/nested/ObjCpp.mm", @@ -721,14 +721,15 @@ describe("Source code support", () => { sourceFileNames.map(file => path.basename(file)).forEach(basename => { const ext = path.extname(basename); - const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h"); + const shouldBeAdded = ext !== ".donotadd"; assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`); + const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)); - if (shouldBeAdded) { + if (shouldBeAdded && !path.extname(basename).startsWith(".h")) { assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`); assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`); } else { - assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`); + assert.isUndefined(buildPhaseFile, `${basename} is added to PBXSourcesBuildPhase, but it shouldn't have been.`); } }); }); @@ -749,14 +750,15 @@ describe("Source code support", () => { sourceFileNames.map(file => path.basename(file)).forEach(basename => { const ext = path.extname(basename); - const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h"); - const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)); + const shouldBeAdded = ext !== ".donotadd"; assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`); - if (shouldBeAdded) { + + const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)); + if (shouldBeAdded && !path.extname(basename).startsWith(".h")) { assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`); assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`); } else { - assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`); + assert.isUndefined(buildPhaseFile, `${basename} was added to PBXSourcesBuildPhase, but it shouldn't have been`); } }); });