This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-lib.git
The following commit(s) were added to refs/heads/master by this push:
new 91249226 fix: platform add with tarball (#918)
91249226 is described below
commit 91249226615cd44390b1721e381e7236fe2936c5
Author: エリス <[email protected]>
AuthorDate: Fri May 19 12:27:32 2023 +0900
fix: platform add with tarball (#918)
* fix: platform add with tarball
* fix: npm natually fetches latest so remove the flag
* test: remove unneeded install spec
---
spec/cordova/platform/addHelper.spec.js | 6 ------
src/cordova/platform/addHelper.js | 6 ------
2 files changed, 12 deletions(-)
diff --git a/spec/cordova/platform/addHelper.spec.js
b/spec/cordova/platform/addHelper.spec.js
index 3f2ae0a1..d95a6a1a 100644
--- a/spec/cordova/platform/addHelper.spec.js
+++ b/spec/cordova/platform/addHelper.spec.js
@@ -167,12 +167,6 @@ describe('cordova/platform/addHelper', function () {
});
});
- it('should fall back to using pinned version if both package.json
and config.xml do not specify it', function () {
- return platform_addHelper('add', hooks_mock, projectRoot,
['ios'], { restoring: true }).then(function () {
- expect(events.emit).toHaveBeenCalledWith('verbose',
'Grabbing the latest released version from the npmjs registry.');
- });
- });
-
it('should invoke fetch if provided as an option and spec is a
directory', function () {
cordova_util.isDirectory.and.returnValue(projectRoot);
cordova_util.fixRelativePath.and.returnValue(projectRoot);
diff --git a/src/cordova/platform/addHelper.js
b/src/cordova/platform/addHelper.js
index 8a78d413..08562453 100644
--- a/src/cordova/platform/addHelper.js
+++ b/src/cordova/platform/addHelper.js
@@ -98,12 +98,6 @@ function addHelper (cmd, hooksRunner, projectRoot, targets,
opts) {
spec =
module.exports.getVersionFromConfigFile(platform, cfg);
}
- // If spec still doesn't exist, grab latest released
version from the npmjs registry
- if (!spec) {
- events.emit('verbose', 'Grabbing the latest released
version from the npmjs registry.');
- spec = 'latest';
- }
-
// Handle local paths
if (spec) {
const maybeDir = cordova_util.fixRelativePath(spec);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]