cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12592) Refactor and add delete require.cache to cordova_util and create pkgManager
Date Tue, 04 Apr 2017 19:46:41 GMT

    [ https://issues.apache.org/jira/browse/CB-12592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955700#comment-15955700
] 

ASF GitHub Bot commented on CB-12592:
-------------------------------------

Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/536#discussion_r109752493
  
    --- Diff: cordova-lib/src/cordova/platform.js ---
    @@ -125,7 +125,7 @@ function addHelper(cmd, hooksRunner, projectRoot, targets, opts) {
                         } else if (pkgJson.dependencies[platform]) {
                             spec = pkgJson.dependencies[platform];
                         }
    -                    delete require.cache[require.resolve(path.join(projectRoot, 'package.json'))];
    +                    pkgJson = cordova_util.requireNoCache(path.join(projectRoot, 'package.json'));
    --- End diff --
    
    i don't think this line is needed


> Refactor and add delete require.cache to cordova_util and create pkgManager
> ---------------------------------------------------------------------------
>
>                 Key: CB-12592
>                 URL: https://issues.apache.org/jira/browse/CB-12592
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-lib
>            Reporter: Audrey So
>            Assignee: Audrey So
>            Priority: Minor
>              Labels: 7.0.0
>
> There are 120 instances of delete require.cache in cordova-lib. It should be refactored
and added to cordova_util so it can be reused when needed. Package manager should also be
created to load and save pkgJson files. Package manager loads files without require so that
there is never a cache and saves stringified object to file.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message