[
https://issues.apache.org/jira/browse/CB-12592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955638#comment-15955638
]
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_r109752110
--- Diff: cordova-lib/src/cordova/package_manager.js ---
@@ -0,0 +1,37 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+
+var fs = require('fs');
+
+// packageManager loads package.json files without require so that there
is never a cache
--- End diff --
it loads any `.json` files, not just `package.json`
> 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: [email protected]
For additional commands, e-mail: [email protected]