From f197257a244aa44fde1a1b4cfb3c5186b8f00d56 Mon Sep 17 00:00:00 2001 From: Dirk-Jan Hoek Date: Wed, 17 Apr 2019 07:59:44 +0200 Subject: [PATCH] fix(): use require instead of context.requireCordovaModule --- hooks/lib/ios/xcodePreferences.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/lib/ios/xcodePreferences.js b/hooks/lib/ios/xcodePreferences.js index 41599d27..32f6bc6b 100644 --- a/hooks/lib/ios/xcodePreferences.js +++ b/hooks/lib/ios/xcodePreferences.js @@ -147,7 +147,7 @@ function loadProjectFile() { projectFile = platform_ios.parseProjectFile(iosPlatformPath()); } catch (e) { // Then cordova 7.0 - var project_files = context.requireCordovaModule('glob').sync(path.join(iosPlatformPath(), '*.xcodeproj', 'project.pbxproj')); + var project_files = require('glob').sync(path.join(iosPlatformPath(), '*.xcodeproj', 'project.pbxproj')); if (project_files.length === 0) { throw new Error('does not appear to be an xcode project (no xcode project file)'); @@ -155,13 +155,13 @@ function loadProjectFile() { var pbxPath = project_files[0]; - var xcodeproj = context.requireCordovaModule('xcode').project(pbxPath); + var xcodeproj = require('xcode').project(pbxPath); xcodeproj.parseSync(); projectFile = { 'xcode': xcodeproj, write: function () { - var fs = context.requireCordovaModule('fs'); + var fs = require('fs'); var frameworks_file = path.join(iosPlatformPath(), 'frameworks.json'); var frameworks = {}; @@ -172,7 +172,7 @@ function loadProjectFile() { fs.writeFileSync(pbxPath, xcodeproj.writeSync()); if (Object.keys(frameworks).length === 0){ // If there is no framework references remain in the project, just remove this file - context.requireCordovaModule('shelljs').rm('-rf', frameworks_file); + require('shelljs').rm('-rf', frameworks_file); return; } fs.writeFileSync(frameworks_file, JSON.stringify(this.frameworks, null, 4)); diff --git a/package.json b/package.json index 7bbfba63..df85efa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-deeplinks", - "version": "1.1.0", + "version": "1.1.1", "description": "Cordova plugin to add in your application support for Universal Links (iOS 9) and Deep Links (Android). Basically, open application through the link in the browser.", "cordova": { "id": "cordova-plugin-deeplinks",